Search Results

Search found 9 results on 1 pages for 'durga dutt'.

Page 1/1 | 1 

  • What points to be used for Drawing Hexagonal Shaped Button

    - by Durga
    Using below code I am able to draw arrow shaped button(shown below) ,but I want to draw hexagone(shown below as result image) ,so that I can use png image of size 175x154 as button image ,What Points I need to use to draw this ? and i need to to draw 6 such buttons ,how do i achieve this ? private void Parent_Load(object sender, EventArgs e) { // Define the points in the polygonal path. Point[] pts = { new Point( 20, 60), new Point(140, 60), new Point(140, 20), new Point(220, 100), new Point(140, 180), new Point(140, 140), new Point( 20, 140) }; // Make the GraphicsPath. GraphicsPath polygon_path = new GraphicsPath(FillMode.Winding); polygon_path.AddPolygon(pts); // Convert the GraphicsPath into a Region. Region polygon_region = new Region(polygon_path); // Constrain the button to the region. btnExam.Region = polygon_region; // Make the button big enough to hold the whole region. btnExam.SetBounds( btnExam.Location.X, btnExam.Location.Y, pts[3].X + 5, pts[4].Y + 5); }

    Read the article

  • Problem in form submit through javascript

    - by Durga Dutt
    I am submitting form via javascript by using 'document.FormName.submit()' . But this is giving me error of 'submit is not a function'. I m using IE8 <script typr="text/javascript"> function submitForm() { document.theForm.submit() } </script> <body> <form name="theForm" method="post"> <input type="text" name= "name"> <input type="button" name="submit" value="submit" onclick="submitForm()"> </form> </body> Please help me ?

    Read the article

  • Problem in running website project

    - by Durga Dutt
    When a run my website project then it gives me error of 'Unable to connect to asp development server'. I am using Visual Studio 2010. Only my website projects are having these prblems. I have tried reinstalling vs2010 . But again & again i m having same problem. Please help me. Thanks in advance & Happy New Year 2011. I wish this will bring a lot of happiness and prosperity in everyone's life.

    Read the article

  • How to deal with extra space characters while Reading a CSV file?

    - by Ravi Dutt
    I am reading a CSV file with CSV Open Source API. as shown below: Java Code:--> CSVReader reader = new CSVReader(new FileReader(filePath),'\n'); String[] values; if((read=(reader.readNext()))!=null) { values = (read[0].split(" (?=([^\"]*\"[^\"]*\")*[^\"]*$)",-1)).length; } // code ends here When I read this CSV file line by line and split that line with delimiter. Then after spliting values each value I get contains extra space character after each character in String. Suppose value in file is like "ABC" and I got this after reading from CSV file reader as " A B C " . I used removeAll("\s+","") on each value even after it is not working. Thank You in Advance.

    Read the article

  • Open page in Joomla

    - by dutt
    I'm using Jumi to echo php code and then showing that in a Joomla Article, and everythings working fine. Now I want to do this: The output is basically a list from a database like this: Name Price Type A 1 T1 B 2 T2 In this list I want to include links to only show items of the same type, so "T1" would like to a page only showing things of type T1. So I thought I would do this by making a new page that takes a type and then get all the items of that type from the database. Without Joomla this wouldv'e been a piece of cake, with Joomla I'm not quite sure where to begin. How should the a href=... tags in the html code printed by my php script look? Is my basic structure still correct, and if so, how do I make Joomla open the new page in the normal frame and not replace the whole Joomla page. some kind of target-frame attribute?

    Read the article

  • Get active window title in X

    - by dutt
    I'm trying to get the title of the active window. The application is a background task so if the user has Eclipse open the function returns "Eclipse - blabla", so it's not getting the window title of my own window. I'm developing this in Python 2.6 using PyQt4. My current solution, borrowed and slightly modified from an old answer here at SO, looks like this: def get_active_window_title(): title = '' root_check = '' root = Popen(['xprop', '-root'], stdout=PIPE) if root.stdout != root_check: root_check = root.stdout for i in root.stdout: if '_NET_ACTIVE_WINDOW(WINDOW):' in i: id_ = i.split()[4] id_w = Popen(['xprop', '-id', id_], stdout=PIPE) for j in id_w.stdout: if 'WM_ICON_NAME(STRING)' in j: if title != j.split()[2]: return j.split("= ")[1].strip(' \n\"') It works for most windows, but not all. For example it can't find my kopete chat windows, or the name of the application i'm currently developing. My next try looks like this: def get_active_window_title(self): screen = wnck.screen_get_default() if screen == None: return "Could not get screen" window = screen.get_active_window() if window == None: return "Could not get window" title = window.get_name() return title; But for some reason window is always None. Does somebody have a better way of getting the current window title, or how to modify one of my ways, that works for all windows? Edit: In case anybody is wondering this is the way I found that seems to work for all windows. def get_active_window_title(self): root_check = '' root = Popen(['xprop', '-root'], stdout=PIPE) if root.stdout != root_check: root_check = root.stdout for i in root.stdout: if '_NET_ACTIVE_WINDOW(WINDOW):' in i: id_ = i.split()[4] id_w = Popen(['xprop', '-id', id_], stdout=PIPE) id_w.wait() buff = [] for j in id_w.stdout: buff.append(j) for line in buff: match = re.match("WM_NAME\((?P<type>.+)\) = (?P<name>.+)", line) if match != None: type = match.group("type") if type == "STRING" or type == "COMPOUND_TEXT": return match.group("name") return "Active window not found"

    Read the article

  • Send Ctrl+Up to a window

    - by dutt
    I'm trying to send messages to a window that says Ctrl and Up-arrow has been pressed. I've got the basics down, I can send presses of the space key that registeres fine. But I can't seem to get the ctrl+up working. chosen code snippets: [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)] static extern IntPtr SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam); Now this works fine for sending Space: public static void SendKeyPress(IntPtr handle, VKeys key) { SendMessage(handle, (int) WMessages.WM_KEYDOWN, (int) key, 0); SendMessage(handle, (int)WMessages.WM_KEYUP, (int)key, 0); } But this doesn't work for sending Ctrl+Up: public static void SendKeyPress(IntPtr handle, VKeys key, bool control) { SendMessage(handle, (int) WMessages.WM_KEYDOWN, (int) key, 0); SendMessage(handle, (int) WMessages.WM_KEYDOWN, (int)VKeys.VK_CONTROL, 0); SendMessage(handle, (int)WMessages.WM_KEYUP, (int)key, 0); SendMessage(handle, (int)WMessages.WM_KEYUP, (int)VKeys.VK_CONTROL, 0); } What am I missing?

    Read the article

  • Big numbers with fraction support

    - by dutt
    I need a c# number something that can handle very large numbers but also fraction support, I looked at System.Numberics.BigInteger coming in .NET 4.0 but I can't get it to work with fractions. something i = 2; something j = 5; something k = i/j; //should be 0.4 when i tried BigInteger i = 2; BigInteger j = 5; double d = (double)(i/j); //d is 0.0 Does anybody know such a library?

    Read the article

  • User control disapear when added to a Panel

    - by dutt
    I've got a user control class that works fine, drawing, events firing and the works. When i programmaticly add it to a class that extends from Panel it disapears. I've checked around and the line that makes it disapear is the line where i go panel.Controls.Add(myuserControl). Without that line the control works just fine, does anybody know why it won't show after the add? I'm currently doing the painting of the user control by overriding OnPaint, but the panel is using the default painting.

    Read the article

1