Topics
-
-
- Administrators
- 1 reply
- 794 views
With our latest release we are starting to install shared assemblies into the GAC, which in itself is no big deal. However, we do have a problem for which I did find a solution, but the solution might not be very attractive or even viable for Vista. A while back we added methods to a Logger class that accept a stack frame number to obtain file name and line number information, and many of our C# component use these methods. Internally the Logger class makes use of the .NET StackTrace class which in turn relies on the corresponding PDB, which must be in the same folder as the assembly. And all this works perfectly. Now we've got our assemblies in the GAC, which mean…
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 3 replies
- 1.1k views
Hi! I have a WPF application that I'm building in Expression Blend 2. There's a main window (Window 1). On Window 1 there are a number of buttons. Those buttons each open Window 2 in a new window, but depending on each button, Window 2 gets different images/media. Right now, The buttons open Window 2 in a new window. I want to change that. I want the whole application to be built on tabs. So that Window 1 will be in a tab, and the user can click a button and it will open a new tab that has Window 2's contents. And on a different button, it opens another instance Window 2 in a new tab, just with a few changes. Is there a simple and easy way to do this? Please hel…
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 1 reply
- 648 views
Tabs to right Hi! I have a tab control in a WPF application in Expression Blend 2. I want that the tabs should be on the right side, not the left, like they are by default. How do I do this in WPF/Expression Blend? Thanks!
Last reply by PlausiblyDamp, -
-
-
- Leaders
- 3 replies
- 5.8k views
Hi, I want to detect a mouse event anywhere on the screen,By now Im only detecting the click inside the form: Private Sub Main_MouseDown(ByVal sender As Object, ByVal e As_ System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown If e.Button = Windows.Forms.MouseButtons.Right Then MsgBox("Right") End If End Sub In advance thanks!!
Last reply by Wile, -
-
- 0 replies
- 1.6k views
I have been analysing libexif library for parsing EXIF. On analysis, I could extract image orientation, thumbnail, maker...etc from EXIF of an JPEG image. But I am not able to fine any provision to write Orientation back to exif. Has anyone idea on how to write back to EXIF using libexif library?
Last reply by techietalk, -
-
- Administrators
- 1 reply
- 952 views
Hi, How to retrieve the winform controls from another Form? For Example i have winForm named as sample1,in which i want to write code for to retrieve controls of another form named as Sample2? Is It Possible? How to use control.controlcollection.find(formname)? Thanks Subash
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 4 replies
- 3k views
HI, I have written a statement to update hits per record in DB (im using access db). However, if i add where clause i get an error "Parameter ?_1 has no default value". This is my code: protected void DataList1_Load(object sender, EventArgs e) { Label Label1 = DetailsView1.FindControl("Label1") as Label; Label hits = DataList1.FindControl("hits") as Label; TextBox TextBoxVideoId = DataList1.FindControl("TextBoxVideoId") as TextBox; string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\\CenterDB.mdb"; OleDbConnection conn = new OleDbConnection(connectionString); conn.Open(); Ol…
Last reply by PlausiblyDamp, -
-
- 8 replies
- 19.7k views
Can anyone give an example on reading an excel file using the Excel Object and C#? Most of the example I have seen are in VB.Net and I am unable to convert my VB.Net code into C#. It may not be as simple as translating the VB.Net code line by line (which I am doing) so, I am wondering if there is any tibbit on doing it in C# from all those C# experts out there. All I am trying to do is...using the Excel Object, 1.) Open the workbook (identified by the file path name) 2.) Locate a worksheet (specified by a name) 3.) Read in each cell row-by-row into a local variables (some are strings and some are integer) I had no problem doing it in VB.Net, but yet I am having a…
Last reply by filip, -
-
- Leaders
- 1 reply
- 3.3k views
I have a little situation that I can't seem to resolve and was hoping someone might have some suggestions ... I have a Windows Service (Serv.exe) which runs under LocalSystem when a user is logged-on (it is only running when users are logged-on), this service is responsible for performing various administrative tasks, one of which is applying registry (.reg) files when needed. The Services uses REGEDIT (/s /i) to merge in the registry files (.reg) - and this is where things get rough - these registry files related to HKEY_CURRENT_USER (for the user currently logged on) - obviously this causes issues because regedit is being run as a LocalSystem (which is not current…
Last reply by snarfblam, -
-
- 1 reply
- 654 views
I have a .NET COM class that's compiled into a .dll that I'm referencing in VB6 code. Is there a way to make a .NET COM class a "master class" (not sure what the right terminology is - which is probably why I can't google it easily)? When I say "master class" I want to initialize an instance of this one time and all other creations of this same object are references to the original creation. So, the first time it's created and I set all the properties on this object, elsewhere in code I create another variable of this type but I don't want a new one with it's own set of properties etc. I want this to reference the originally created one. Is this possible? …
Last reply by wsuBobby, -
-
- Administrators
- 2 replies
- 1.3k views
Hey guys and gals. First post on dotnettalk forums but I've been on your sister site vbtalk. So, hey there! I have some general questions about ADO .NET. I've done some reading on MSDN and such and I'm still a little foggy. I'm porting some db access code from VB6 to .NET. In VB6 I used ADO 2.5 reference (Microsoft ActiveX Data Objects 2.5 Library). Now, when porting to .NET code, I am not referencing this VB6 reference. Instead I am using the Imports ADODB statement. 1st question: Using the Imports ADODB statment, is this considered ADO .NET? When reading about ADO .NET I don't see this listed as a data provider. Therefore I'm confused if Imports ADOD…
Last reply by wsuBobby, -
-
-
- Administrators
- 1 reply
- 1.3k views
Hi, I have a single line of code in VB6 which I wanna convert to .NET: Here is my VB6 code: If CDbl(Right(Results, 1)) = 0 Then Rights = 500 I already have converted it and here it is: If Convert.ToDouble(Results.ToString.Substring(Results.ToString.Length - 1, 1)) = 0 Then Rights = 500 Just to make sure if I converted correctly and there is no shorter/better way specially for Right$ function, please let me know if my conversion is OK? Thank you very much.
Last reply by PlausiblyDamp, -
-
- 0 replies
- 605 views
Is there any way to get a computer to wake from standy automatically? On coming out of standy there's a requirement to press a button against my username before the computer is operational so I'd want to get past that step automatically too. Grateful for any help.
Last reply by rbulph, -
-
- Administrators
- 2 replies
- 728 views
I have recreated System.Net.Mail.Message, because Microsoft did not see a reason to implement the Serializable feature. It looks like everything in Microsoft's Mail.Message class can be duplicated by organizing and naming strings appropriately. I want to implement IDispose in my class so that it cleans itself up nicely, and (with the way I designed my class) all I need to dispose of are strings! My email attachments are loaded from the local PC using a Stream Reader, then loaded into a string buffer (which gives me a 2 GB capacity - I'm hoping this is going to work, but it is still being developed). My custom Message object handles attachments by creating a List …
Last reply by joe_pool_is, -
-
-
- Leaders
- Administrators
- 3 replies
- 894 views
Hi I am trying to check if multible files exists and i can not seem to figure out how to get it to work. Below is what i use. If FolderBrowserDialog1.ShowDialog() = DialogResult.OK Then FileContents.Text = FolderBrowserDialog1.SelectedPath.ToString If (Not (IO.File.Exists(IO.Path.Combine(FolderBrowserDialog1.SelectedPath, "WIN51IP.SP3"))) _ Or (Not (IO.File.Exists(IO.Path.Combine(FolderBrowserDialog1.SelectedPath, "WIN51IC.SP3"))))) Then MESSAG = DataDLL.MSGS(1) Message.Show() FileContents.Text = "" Exit Sub Many Thanks for any help Wor…
Last reply by PlausiblyDamp, -
-
-
- *Experts*
- 10 replies
- 13.2k views
Screenshot from directX in C#. SOLVED! In c++ there is a nice way of geting and saving a screenshot. Does anyone know how to do this in C#. The problem is that ther is no equivalent to the C++ D3DXSaveSurfaceToFile() in C#. I have found som C++ code that gos like this: HRESULT CMyD3DApplication::Screenshot( char* filename ) { HRESULT hr; D3DDISPLAYMODE dmCurrent; LPDIRECT3DSURFACE9 pSurface = NULL; if ( !m_pd3dDevice ) return E_FAIL; ///////////////////////////////// // QUERY CURRENT WINDOW MODE // ///////////////////////////////// hr = m_pd3dDevice->GetDisplayMode( 0, &dmCurrent ); if …
Last reply by v8maro, -
-
- 0 replies
- 850 views
I've built an application that reads data from a table, and populates that data into a series of DataGridView (DGV) controls. DataTable table = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(sqlText, sqlConnection); da.Fill(table); DataGridViewX.DataSource = table.DefaultView(); Simple. There is a lot of data, so I've had to limit the amount that I read in, because I can quickly exceed WinXP's 2GB per user limit. In Task Manager, I can see that my App takes up about 17MB (megabytes) while at the IDE, jumps to roughly 24MB in debug mode, then quickly approaches my limit as I pull in data from tables. What I'm working on to keep pulling in data is to tak…
Last reply by joe_pool_is, -
-
- Administrators
- 2 replies
- 1.2k views
Hi All, I am facing issues after migrating our application from VS 2003 to VS 2008. We use Asp.net and C#(as code behind). Therea are 2 dropdowns in the page. On change of values of these dropdowns we need to grop the data accordingly and display in a datagrid. By default the data will be sorted on the column that is selected in the dropdown. After the data is displayed, if user clicks on some other column in the datagrid header, data should be sorted on the column clicked by the user. But after migration to VS 2008, when user is clicking on some other column in the datagrid, application is not changing the sorting column. Example: I select "Age" in the dropd…
Last reply by Swapnam, -
-
-
- Administrators
- 1 reply
- 2.1k views
Hello, I send some data to a server (but don't wait for any answer) with this piece of code: private void Send() { TcpClient client = null; try { client = new TcpClient(s_host, s_port); } catch { PushLog("Failed to connect to {0}:{1}...", s_host, s_port); return; } NetworkStream networkStream = client.GetStream(); StreamWriter streamWriter = new StreamWriter(networkStream); streamWriter.AutoFlush = true; streamWriter.NewLine = "\r\n"; try { string req = string.Format("foo", s_loginName); streamWriter.WriteLine("POST /myendpoint?message=foo HTTP/1.0\r\nContent-Type: text/plain; charset=utf-…
Last reply by PlausiblyDamp, -
-
-
- Leaders
- 2 replies
- 3.6k views
I'm trying to get hold of basic information about the screen cursor. But the following doesn't work at all. What am I doing wrong? Public Class Form1 Private Declare Function GetCursorInfo Lib "user32.dll" (ByVal pc As CURSORINFO) As Long 'Idea to only click when cursor is a hand. Can't get it to work in .net. Works OK in VB6 though. Structure CURSORINFO Dim cbsize As Long Dim flags As Long Dim hCUrsor As Long Dim p As Point End Structure Structure PointAPI Dim X As Long Dim Y As Long End Structure Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick …
Last reply by rbulph, -
-
Who's Online 0 Members, 0 Anonymous, 39 Guests (See full list)
- There are no registered users currently online