How can I set Attached or Detached second monitor in win32?
Oskars
Posts
-
Set second display as attached in win32 -
Simple Web User Control dynamic parts ...The problem is, that everything show up good, but click events does`nt work. When I click on dynamically added hyperlinks, hyperlink click event does`nt run, but page reloads and everything is gone.
-
Simple Web User Control dynamic parts ...Hi, I am experienced in C#, but new in ASP.NET. I cannot understand Web page life cycle. If I understand correctly, Web page class is destroyed every time you press the button or something. So I store my properties in ViewState. but there is a problem. I use TextBox to get keyword, which I use for database records retrieval. When i retrieve database records I add dynamically new rows to table with hrefs. private void LoadData() { baseTechPartArray mParts = DataBase3.Get_baseTechPartArray_By_Keyword(KeyWord); for (int i = 0; i <= mParts.Count - 1; i++) { TableRow mRow = new TableRow(); TableCell cellPickup = new TableCell(); TableCell cellName = new TableCell(); TableCell cellCode = new TableCell(); mRow.Cells.Add(cellPickup); mRow.Cells.Add(cellName); mRow.Cells.Add(cellCode); ContainerTable.Rows.Add(mRow); LinkButton hrefName = new LinkButton(); hrefName.Text = mParts.Get(i).name; hrefName.Attributes["record_id"] = mParts.Get(i).id.ToString(); LinkButton hrefCode = new LinkButton(); hrefCode.Text = mParts.Get(i).code; hrefCode.Attributes["record_id"] = mParts.Get(i).id.ToString(); ImageButton mPickupButton = new ImageButton(); mPickupButton.BorderWidth = 0; mPickupButton.ImageUrl = "../Resources/pickup.gif"; mPickupButton.Attributes["record_id"] = mParts.Get(i).id.ToString(); cellPickup.Controls.Add(mPickupButton); cellName.Controls.Add(hrefName); cellCode.Controls.Add(hrefCode); mPickupButton.Click += new ImageClickEventHandler(mPickupButton_Click); hrefCode.Click += new EventHandler(hrefCode_Click); hrefName.Click += new EventHandler(hrefName_Click); cellPickup.Attributes["width"] = "1%"; cellCode.Attributes["width"] = "30%"; } } but Click events does not work until I add Load() method to PageLoad or LoadViewState. But then some of table rows are still from first page load, I try to clear them, but it does`nt help. What simple framework or principle should I use 1)to get work simple onevent -> 2)add dynamic elements with their events -> 3)use dynamically added control events?
-
C++ code reengeneeringDoes anybody knows good tool with visual support for C++ code reengeneering? maybe there is software where I can do class and methods modelling in visual diagrams and the software are generating code framework for me?
-
how to place custom controls on top of the other controlsActually I am talking about C# windows form. I have a grid in one panel, other grid in other panel. One of the columns contains comboboxes, ComboBox list, of course appears over the second grid, I want my custom control wich contains some textboxes and other crap show up in similar way. Way I am using - is separate form without close and minimize buttons, but it is not Control added to grid cell, it is separate windows form and it is not good solution, because it shows up in a taskbar and acts like form, but I want to attach it to the grid cell as a normal control :(
-
how to place custom controls on top of the other controlsOk I`ll try to explain my problem :). ComboBox, places his choice list on top of the other controls, including other panels and so on. The question is - how can I make other custom control maded by myself wich is added to some panel [mPanel.Controls.Add(MyControl);] - to show up on top of the other controls and other panels (like ComboBox choice list), but without separate it from [mPanel.Controls]. Can control actually act like ComboBox list on top of other controls?
-
normal fast way to determine control global position?I have to determine what is control x and y global position in screen, not local position, to show up dialog on top of the control - is there normal known way to do that?
-
How to create simple boolean property for usercontrol, so, that it shows in IDE property page?...
-
How to store images in dll?Thanks - it was very fast :)
-
How to store images in dll?:confused: I understand, that this is simple question for peoples who work with C# some time. But there is the question: I create Windows forms dll in C# and I have to store bmp jpg files in this dll - not located as image in disk, but included in one dll file. Embedded resources or something? Please give me a tip.
-
.NET ASPX page life cycleI am very confused by .NET ASPX page processing model. I am using C# and creating simple database data dependant dynamic form with bunch of generated buttons. After that I am catching server side processed standard onclick events on these buttons and in onclick event function creating some other dynamic elements such as textboxes and other buttons. When I am pressing on new one created buttons generated outside page_load function - page reloads and these elements (of course) is lost! Now I am using some sick mytype in Session wich holds my dynamic cotrols and restores them by page_load. I suppose this is not the recommended way to do things (but for now) it works very well, maybe there is some logic and normal way to hold dynamically created elements in page. And I am wandering why .NET guys destroys page instance on each event?
-
insert too slow????Actually, in my experience whery big ammount of inserts is allways not too fast, especially if you are executing it in some kind of for() or while() cycle. Some time ago I created a 2D map in database where insert was wery simple like that: insert (x,y, ) values (1,2,34). In my case I used 2 for() cycles and OdbcConnection with OdbcCommand. insert statement was executed 1`000`000 times and it took 15-20 minutes because someMapType was Random generated number. I suggest you have to check and try optimize your code, maybe even create transaction sql file and execute it in database side with you oledb. And there is one more thing - Access is the sickest database I ever seen. Maybe you should try some other database.
-
Some problem with Postgre and C# .NET ADOI created database in Postgre and used Postgre ODBC to connect to database. By using simple VB6 application with standard ADODB.Connection I can connect to database without any problems. But when I`m using OdbcConnection in C# ASP.NET Web application, on _Conn.open() I get this error message: ERROR [IM003] Specified driver could not be loaded due to system error 998 (PostgreSQL). Is there some experience out there with similar problems? :((
-
Capturing active 2d spriteHi! I am new in DirectX programming and have some difficulties with getting mouse position and active sprite on Device screen. Maybe I don`t understand completely principles of IDirectInputDevice8. I am creating some LPD3DXSPRITE and LPDIRECT3DTEXTURE9 on screen and using LPDIRECTINPUTDEVICE8 to capture mouse. But I can`t completely get texture or sprite under mouse. Is there some simple principles to get elements above mouse cursor? Maybe sample or something? :confused: :mad: :wtf: