|
Hi!
This info is too sparse to provide true help. But if I understand your request correctly, the SQLServer cannot be accessed after a while, correct?
The "GENERAL NETWORK ERROR" is in your app when you try to query the SQL Server?
If it's not happening immediately it sounds like a ressource leak.
Make sure you free/dispose of any connections you create after you don't need them anymore.
mav
|
|
|
|
|
Hi everybody,
I am trying to convert a project from VS 2003 to VS 2005. But i couldn't findout the csharpEmpty.vsz at C:\Program Files\Microsoft Visual Studio 8\VC#\VC#Wizards as in VS 2003. In VS 2003 it is located at C:\Program Files\Microsoft Visual Studio .NET 2003\VC#\CSharpProjects\csharpEmpty.vsz.
Please any one help me to solve this problem, either by new path( I searched a lot , but ) or any other way to call an empty CSharp wizard.
|
|
|
|
|
Hi all
I have used this function
[DllImport("user32")]
public static extern int SetCaretPos(int x, int y);
public void setPos(int x1,int y1)
{
SetCaretPos(x1,y1);
}
to set the position of the caret cursor but it is not setting the position of the caret cursor at the given coordinate please help me out
|
|
|
|
|
I create 2 usercontrols: one is parent control that has a collection of child control. Both controls are inherited from panel. The problem is if i add child control into the parent control by using EditorAttribute(typeof(System.ComponentModel.Design.CollectionEditor), typeof(System.Drawing.Design.UITypeEditor)), everything looks fine, and I got both parent control and all child controls variable on the code at design-time.
However, if i try to add child control into the parent control myself by using IList.Add method or even Add method (the same method that the CollectionEditor call), it get problems: 1) The design view looks ugly and 2) the child controls variable doesn't appear on code. I don't know how the CollectionEditor create a new instance of the child control and add it to the parent control Anyone please help !!!
PS. For some reason, I need the child controls are created properly on the code.
|
|
|
|
|
Does some of you could tell me what's the function of the codes below:
Thanks!
void DisplayShape(bool Light)
{
HPEN hNPen,hOPen;
HBRUSH hOldBrush,hNewBrush;
COLORREF cfill;
if (Light)
{
if (cluminance == 3) return;
cluminance = 3;
cfill=RGB(0,255,0);
}
else
switch(cluminance)
{
case 3: {cluminance--; cfill=RGB(64,255,64); break;}
case 2: {cluminance--; cfill=RGB(128,255,128); break;}
case 1: {cluminance--; cfill=RGB(192,255,192); break;}
default: cfill=RGB(255,255,255);
}
hdc = GetDC(hWndG);
hNPen=CreatePen(PS_SOLID,1,RGB(0,0,0));
hOPen=(HPEN)SelectObject(hdc,hNPen);
hNewBrush=CreateSolidBrush(cfill);
hOldBrush=(HBRUSH)SelectObject(hdc,hNewBrush);
Ellipse(hdc,393,235,443,285);
DeleteObject(SelectObject(hdc,hOPen));
DeleteObject(SelectObject(hdc,hOldBrush));
ReleaseDC(hWndG,hdc);
}
|
|
|
|
|
It's C Code. It draws an Ellipse, and every time it is called, the colour changes. It fades up to white, but not in greyscale, the green component is always 255.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
i'm working on an existing VC6 application which has a plugin architecture supporting dlls which export and accept pure virtual inteface pointers. ie after loading the dll, the exe calls an exported C function on the dll which returns a pointer to a PVI. the exe then calls methods on the pPVI somtimes passing back a pointer to another PVI for the dll to manipulate.
now, this is trivial using traditional c++ and i've done it many times but more recently people writing the plugins has asked to use c#, VB.NET and other more 'modern' languages. the trouble is that i've very little experience of .NET programming and the issues around allowing managed and unmanaged code to communicate. and the more i google the less clear it becomes.
any suggestions for further reading matter or urls to sample code would be sincerely appeciated.
.dan.g.
AbstractSpoon Software
|
|
|
|
|
how can i show the icon of my application on system tray bar when windows start up?
Thanks
|
|
|
|
|
Two different questions:
1) Icon in system tray: System.Windows.Forms.NotifyIcon is the class (and sample) you want.
2) Running on windows start: I don't know of any API for this but adding a registry key for your application will do:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
String Key: AppName
Value: Full Path to Exe
|
|
|
|
|
for the second answer:
how can i create a registry key during setup of my application?
on the value "Full Path to Exe", how can know it (and set it on setup time) if the user during the setup chooses a custom directory on its computer?
|
|
|
|
|
If you're using an MSI-type installer project in Visual Studio, you can add registry keys via the registry view of said project.
Drew Noakes
drewnoakes.com
|
|
|
|
|
hi
1) drag and drop the Notify Icon from the tool box.
2) In the Icon properties, you can set the Icon and Visble as true
Then it appears when to the tray bar.
3) Do you need to start the Program at the start up,Simple way is added to application shortcut start up directory or do it using setup wizard .
regards ,
pubudu.
|
|
|
|
|
I get an E_ACCESSDENIED error everytime I try to acquire the keyboard or mouse in anything other than background nonexclusive mode. I know that you can't do foreground in Visual Studio for the keyboard, but this happens even outside of it. Is it even possible to get anything else? I'd at least like foreground nonexclusive for the keyboard, and the same would be nice for the mouse but not as important.
EDIT: I set it up to unacquire the devices when the form is deactivated and reqcquire them when activated. This does the job but I'd still like to do it right.
|
|
|
|
|
Like in sonic, you move right, the screen moves right with you.
Any ideas??
|
|
|
|
|
Well, there are a couple approaches. The simplest one is that you have the entire universe sitting as a huge bitmap, and you blit only a section of it on the screen. Very fast, very memory intensive.
The other approach is that your universe consists of tiles, and you create a virtual space that consists only of the screen size plus the width of a tile on the left and right, the height of a tile on the top and bottom. Now you can move only within the confines of a single tile boundary. So, when you reach the edge, you replace the tiles with new ones and shift the screen coordinates. Not as fast, but it takes up a lot less memory.
There's websites on this stuff that can explain it a lot better than I just did.
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
I would like to change the backcolour of the display text but there does not seem to be a property to do this. Is there a way to change the backcolour at runtime ?
Thanks
Stephen
|
|
|
|
|
I'm trying to get familiar with DirectX.DirectDraw to de able to draw simple graphics to the screen. Is there anything similar to Transform property of Graphics class in the classes that enable simple drawing via DirectX (i.e. surface). Does anybody know a good book/tutorial to get familiar with the basics of (2D) drawing in DirectX?
|
|
|
|
|
Search google for :
Sams.Managed.DirectX.9.Kick.Start.Graphics.Game.Prog
It's really a good book ,and it will help you.
|
|
|
|
|
Okay I've been fooling around with a client/server file sending, and I have it working, except the new file being written is not the same as the file being sent. Obviously this is due to some sort of Encoding error as I am sending the data via UTF8 encoding. Basically I want to know if I can convert the UTF8 code to binary and write the data to a file, or if not, what encoding should I send and receive data with? I use the UTF8 for all the other messages. Thanks.
|
|
|
|
|
Why don't you use a BinaryReader/BinaryReader so that you can read and write a byte[] array from file directly into the BinaryWriter and send it across the network?
That's the way I'd do it.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
For some reason if I do the BinaryReader it says it's in use by another process??
|
|
|
|
|
Ok i've been wanting to know how to do this for a while now:
How do i include files like pictures, sounds in my application and then use them.
This is so i dont have to keep the files where people can get to them and i dont have to keep copying all of those files...
So how do i do it?
|
|
|
|
|
|