progames25's Q&A profile
Windows Forms Show dialog after main window appears
I have a dialog window and it shows before the main window. win.ShowDialog() is in Form_Load(). How do I get the main window to appear first the in the load method before showing the dialog box call the Me.Show() ; Private Sub Form1_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load Me .Show() Dim dlg As New YourDialogForm() dlg.ShowDialog() End Sub ...Show All
Visual Studio 2008 (Pre-release) How to prevent TabControl from doing multi rows?
Unfortunately the TabControl displays a second line for TabItems which do not fit in the first row. Is there an easy way to prevent the TabControl from doing multirows, to enable a TabControl look like VisualStudio or IE7 Hi Drew thanks a lot ! in your Sample, a closing </ControlTemplate> is missing (line 60) </Grid> </ControlTemplate> </TabControl.Resources> ...Show All
Visual C++ Randomly permute an array!
Hi there, I have to randomly permute an arry of data, more precisely, variable length coding (vlc) table using a key or password. Please explain with an example in C. Thank you. Or just doing an internet search for this will return hundreds of links to articles dealing with this topic. ...Show All
Visual Studio 2008 (Pre-release) Creating FrameWorkElements in async calls?
Is it possible to create a FrameWorkElement in an async call. I've tried but get an InvalidOperationException - "The calling thread must be STA, because many UI components require this" My code: public static void LoadPage() { ConstructNewPageAsync test = new ConstructNewPageAsync(ConstructPage); test.BeginInvoke(new AsyncCallback(Completed), null); } private static void ConstructPage() { Canvas c = new Canvas(); //Here i get the exception } Is there no way to throw the object over to the main-thread. In my real app it is not a canvas i'm creating but a much more complex control that inherits from canvas. It takes about 3secs to create t ...Show All
Windows Forms How to save inkPicture control to bmp file
hello, I want to save a inkPicture (signature) to a bmp file how to do this thanks to save a inkpicture into a image (.gif) you do : byte[] sig; if (inkPicture1.Ink.Strokes.Count > 0) { sig =inkPicture1.Ink.Save(PersistenceFormat.Gif); System.IO.FileStream MonFileStream = new System.IO.FileStream("c:\\file.gif", System.IO.FileMode.Create); MonFileStream.Write(sig, 0, sig.Length - 1); MonFileStream.Close(); } ...Show All
Visual Studio Express Editions Expression evaluator
Is there a method or function in VB Express that can, given a string like such as "5 + 3 / 4 ^ 2" evaluate it as an expression and return the result I've written RPN evaluators before, just wanted to know if I had to reinvent the wheel here... Finally found something that does this in the .NET framework... the method is found in system.data.datatable.Compute() .Compute() takes a string like "5 + 3 / 2" and evaluates to an answer. It also returns a boolean on conditionals like "5 > 3 AND 10 = 2 + 5" ...Show All
Visual Basic Please look up the MSDN on the Lock functions and methods
Hi, i got a couple of questions according to how to disable things in win xp: I'd like to disable the net connection on xp - how can i do that how can i disable installing any program disabling themes disable running several programs disable access to several folders I'd like to write a baby-lock onto my computer because i'm not the only person who uses it, and i don't want to allow others to get full control on my pc. i am working with vb2005. Any feedback is appreciated, thnx Attila And using the in-built stuff is normally much simpler than writing code to "reinvent the wheel" Windows Vista has much more parental controls than XP. So I'd hate to see you spend a lot of time writing some ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Can someone reliable give me the relase time of XNA GSE in GMT?
Hi guys, Just wanna know from someone reliable or someone that can tell me if it'll be relased at midnight, or if I don't bother sitting through the night for it. Its just to save me waiting till early moning 30th August, and finding it ain't up until say America reaches midnight. thanks again, Jonathan Thats correct I posted more info in this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=679442&SiteID=1 ...Show All
.NET Development Call client's object method/property from remote object
Here's the scenario: - a client apps (client.exe) and a server apps (server.exe) which will run on separate AppDomain - the server host a WellKnownServiceType called MyServerObject using SingleCall mode. - the client have an instance of MyClientObject (reside on client's AppDomain) - then, the client will remotely call MyServerObject.SomeMethod() The question: - How I can modify some value inside MyClientObject (which reside on client's AppDomain) from MyServerObject which reside on the server's AppDomain I tried to pass MyClientObject as a parameter to the MyServerObject.SomeMethod(MyClientObject obj), but it don't seems to work either. Here's the code snippet (simplified version): server.exe: ChannelServices.Regist ...Show All
Visual Studio Team System Shelveset manipulation
Hi, Ever since I heard about the guantlet, I have been trying to implement a similar idea for our build/release system. I just hit a few snags. In my implementation, once a shelveset has been submitted, the shelveset must not be modified by the developers. Initially, I thought about just changing the owner -- trivial right! Not really. To do this, I had to create a workspace, unshelve the shelveset, reshelve the shelveset and finally delete the workspace. Is there an easier way to do this without unshelving the whole set Suppose I want to append a PendingChange to a shelveset (either from another shelveset or from the current workspace) assuming of course that there are no conflicts. Would I need to unshelve and then reshelve the ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Creating/Destroying an object.
So, I was working on a new update to my game, when I realized that I have no idea how to create or destroy an object outside of the beggining of the game. I've been looking through tutorials, but so far I haven't found anything useful. Can anyone tell me how to do this, or link me to a tutorial on the subject I'd be most grateful. :D I've rarely seen an instance where you need to force the GC to do a collection. And for something like powerups, it's doubtful that you'd have so many of them that you'd need to force it. ...Show All
SQL Server Queryign multiple databases
Hi, I'm a newbie to SQL Everywhere. I have gon e through the examples and created a C# application to create and a manipulate database on desktop. SFSG. For my application, though, I see the need to work around the 4GB limit. So I will need to segment my data into multiple databases. Does SQL Server Everywhere supports joins across mutiple SQL/e databases on the same machine I have not found any examples that guide to address this issue. can anyone point me to something/help me write queries that join D1.T1 and D2.T2. what JP is saying is to load your data from the database into ADO.NET DataTables in your app and then you can use the features of the DataSet and ability to merge DataTables in ADO ...Show All
Visual Studio Express Editions OpenFileDialog ... Close button
When I run my application, if I click the close button (X) in the OpenFileDialog, I get an error message. I have done some searching for code to handle or eliminated the OpenFileDialog close button, but without any luck. Thanks. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e _ As System.EventArgs) Handles Button1.Click OpenFileDialog1.FileName = "" Me.OpenFileDialog1.Filter = "Images (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|All files (*.*)|*.*" If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.Cancel Then MsgBox("OK") End If If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK _ Then myImage = CType(Bitmap.FromFile(OpenFileDialog1.Fi ...Show All
.NET Development Performance Counters for 32 bit Worker Process on x64 OS???
I would like to be able view the performance counters for ASP.NET v2.0... on my server running Windows 2003 Server Std x64. I am running the worker processes in 32-bit mode and the performance counters that I see are for the 64-bit ASP.NET v.2.0... When local to the server I can run this command to see the actual values "mmc.exe /32 perfmon.msc" but how do I achieve the same thing from my workstation using perfmon Thanks for your help! That probably would've worked but due to an incompatability with our application we installed a x86 version of windows and this is no longer an issue for me. Thanks everyone. ...Show All
Visual Studio Unable to debug unmanaged C code
Hi, I have a solution in VS2005 that comprises of a main vb.net project and an unmanaged C DLL, the linkage being via dllimport. I have my vb.net project set to allow debugging of unmanaged code and my C project set as mixed, but no matter what try I cannot get the source displayed when I step into the C DLL. Any ideas Yes, that's correct, I tried building with the pdb and setting the path for that explicitly but still no joy. It just says "exports loaded" (also, in desperation I made every single function in my code an export just so I could start to see where in the DLL it was - yep, really desperate!!) ...Show All
