How to change the backcolor of a MDI form
I'm writing an app in vb.net 1.1 and need to change the backcolor of an MDI
form. I saw in another posting in this user group which referred to a link
<URL:http://vbaccelerator.com/article.asp?id=4306>
which had a good example, however, it was in C# and I wasn't able to get
through it. Can anyone refer a good vb example?
Thanks.
--
moondaddy@nospam.com Tag: Datagrid Border disappears Tag: 79981
VB.NET Application on File Share Cannot Be Updated
I have a VB.NET application that I have deployed via UNC file share.
Everything works fine after the users run the small MSI that sets the
appropriate trust level for the URL.
The problem I am running into, however, is that I cannot push updates
out to the server. When I attempt to copy a newer version of an
assembly, I get a File Sharing Violation error. What gives? I
thought (and verified) that the EXE is downloaded and run in a local
process on the user's machine? When I look in task manager on my
machine, the application shows up (it does not on the server with the
file share).
I used ProcessExplorer on the server, and it seems that there are 3
references and 1 handle to each of the assemblies that comprise the
application. Doesn't matter how many users are currently running the
application. It always shows 3 references and 1 handle. Again, this
makes no sense to me and my understanding of how NTD is supposed to
work. Maybe my understanding is wrong? I have read everything I
could find on deploying applications via file share, and I have not
seen anything about problems copying updated assemblies out to the
share.
Any insight that anyone might have is greatly appreciated. I have
some critical updates that I need to get moved out as soon as
possible.
Thanks,
Ken Tag: Datagrid Border disappears Tag: 79979
numeric up down control - whidbey
if I manually delete the value in the text box in a numeric up down
control, the Value property does not change, and following this,
programmatic changes to the Value property do not get reflected in the
UI although the property does actually get set.
Has anyone else experienced this problem? Can anyone give me any ideas
as to how I can get around this. Or is it just a bug with Whidbey?
Thanks
Jag Tag: Datagrid Border disappears Tag: 79977
How to yield the primary thread to some other task?
Hi,
I'm trying to create a method on my windows form that starts a
multi-threaded task, waits for it to finish, and then returns.
To be more precise: the form has a LoadUrl() method. This method calls
the Navigate() method on the form's embedded WebBrowser control, and
then does a WaitOne() on a ManualResetEvent. This ManualResetEvent will
be Set() from WebBrowser's DocumentComplete handler when loading is done.
So, what happens is this: when Navigate() is called, the web browser
starts the download in a secondary thread and returns, thus jumping to
my WaitOne() call where I wait for it to finish. While downloading, the
browser wants to update the UI, which has to be done from the primary
thread. But no dice, the WaitOne() call is blocking it.
Now, I must do some kind of Wait() on the primary thread because I want
to return from the method only when the operation is complete. But, I
somehow have to wait without blocking this thread. Is this possible?
It seems that the windows form has a solution to this. How does the form
manage this primary thread so it knows how to do BeginInvoke, for
example? Do I need to use the message loop or something?
Any hint is welcome. Thanks in advance!
--
Boris Drajer <boris.drajer@do.not.s.p.a.m.micro-bs.com> Tag: Datagrid Border disappears Tag: 79976
DataGrids, Datasets and ListBoxes
Hello,
I have a windows.forms application in VB.NET which has a DataGrid. I
started simple and so programmed the Grid to appear by Default when the
application opened and show a default dataSet. Now that I have done this I
want to extend the program's capabilities.
Instead of one dataSet I have 6 ( dataSetxxx, dataSetyyy, etc) and a listbox
with 6 items in( xxx, yyy, etc)
I populated the Listbox by...
me.listbox.items.add("xxx") and so on
When the application opens I want to show a picture but when the user
selects one of the options from the ListBox, the corresponding dataSet is
shown in the DataGrid form.
All the dataSets are in XML format.
I'm pretty new to VB.NET and have tried all sorts of different ways of doing
this without any success.
Can anyone help?
Can someone tell me how to make the cells in the dataSet readonly?
Thanks in advance,
James Tag: Datagrid Border disappears Tag: 79973
Vertical text in datagrid cell
trying to display vertical text in a .Net winform datagrid cell....
anybody can help me ?? :
User submitted from AEWNET (http://www.aewnet.com/) Tag: Datagrid Border disappears Tag: 79972
MDI Application
Help
I have an MDI VB.NET application. When I select forms from the mdi menu each
child form opens further down and to the right on the screen than the
previous one. It gets to the point where the forms look unprofessional and
untidy and half of the information is off of the screen. How can I influence
specifically where the child gets postioned when being opened from the menu?
I don't just want to maximise the forms when opening.
--
Thanks
Bill Partridge Tag: Datagrid Border disappears Tag: 79971
Reading & Writing Pictures to sqlserver using vb .net
I do not know that how to store a picture and then retrieve it from database i.e. sqlserver 2000, in vb .net.
in vb 6.0 field.getchunk was used to read the picture
what in vb .net
thanks for ur help
---
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching. Tag: Datagrid Border disappears Tag: 79966
New Forum Needs a Lift! We Need Programmers!
This is a multi-part message in MIME format.
------=_NextPart_000_021A_01C4C2B2.1171BB90
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hi everyone,
www.webdesignmagic.com.au/forum.asp
<BLOCKED::BLOCKED::BLOCKED::BLOCKED::http://www.webdesignmagic.com.au/fo
rum.asp>
I am trying to get a new Programming and Website Design forum in
Australia up and running.
I am looking for new members who may be able to help others in
programming related issues and web site design issues.
Please visit
<BLOCKED::BLOCKED::BLOCKED::BLOCKED::http://www.webdesignmagic.com.au/fo
rum.asp> www.webdesignmagic.com.au/forum.asp and introduce yourself or
maybe see if someone needs help!
I am not using this for marketing purposes, simply wish to repay the
favours others have done for me when I needed help.
Thanks Daren Hawes
MCAD.NET, MCSD.NET
---------
Web Design Magic
Home of the "The Help Desk" Programming Forum.
http://www.webdesignmagic.com.au/TheHelpDesk
------=_NextPart_000_021A_01C4C2B2.1171BB90
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2900.2523" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>
<DIV>
<DIV dir=3Dltr align=3Dleft><FONT face=3DArial size=3D2><SPAN=20
class=3D241442204-04112004>Hi everyone,</SPAN></FONT></DIV>
<DIV>
<DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D241442204-04112004></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D241442204-04112004><A=20
href=3D"BLOCKED::BLOCKED::BLOCKED::BLOCKED::http://www.webdesignmagic.com=
.au/forum.asp">www.webdesignmagic.com.au/forum.asp</A></SPAN></FONT></DIV=
>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D241442204-04112004></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D241442204-04112004>I am =
trying to get a=20
new Programming and Website Design forum in Australia up and=20
running.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D241442204-04112004></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D241442204-04112004>I am =
looking for new=20
members who may be able to help others in programming related issues and =
web=20
site design issues.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D241442204-04112004></SPAN></FONT> </DIV>
<DIV><SPAN class=3D241442204-04112004><FONT face=3DArial size=3D2>Please =
visit=20
</FONT><A=20
href=3D"BLOCKED::BLOCKED::BLOCKED::BLOCKED::http://www.webdesignmagic.com=
.au/forum.asp"><FONT=20
face=3DArial =
size=3D2>www.webdesignmagic.com.au/forum.asp</FONT></A><FONT =
face=3DArial=20
size=3D2> and introduce yourself or maybe see if someone needs=20
help!</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D241442204-04112004></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D241442204-04112004>I am =
not using this=20
for marketing purposes, simply wish to repay the favours others have =
done for me=20
when I needed help.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D241442204-04112004></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D241442204-04112004>Thanks =
Daren=20
Hawes</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D241442204-04112004>MCAD.NET,=20
MCSD.NET</SPAN></FONT></DIV></DIV></DIV></DIV></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>---------</FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2>Web Design Magic<BR>Home =
of the "The=20
Help Desk" Programming Forum.<BR><A=20
href=3D"http://www.webdesignmagic.com.au/TheHelpDesk">http://www.webdesig=
nmagic.com.au/TheHelpDesk</A></FONT></DIV>
<DIV align=3Dleft><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_021A_01C4C2B2.1171BB90-- Tag: Datagrid Border disappears Tag: 79962
AcceptButton closes Form on Failure
Hi!
I have an AcceptButton on my Form. With pressing this Button some checks are
performed and only when they are all okay, then the Form should close.
Can I set this up in some way?
E.g. abort the Closing-Process of the Form...
Thank U very much,
Christian Tag: Datagrid Border disappears Tag: 79955
How to remove all rows in datagrid?
This is a multi-part message in MIME format.
------=_NextPart_000_000A_01C4C289.CB075520
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
Do you know how to remove all rows in datagrid?
datagrid.TableStyles.Clear() seem does not work to me.
Thanks,
Dennis
------=_NextPart_000_000A_01C4C289.CB075520
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2180" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2><FONT size=3D2>
<P>Hi,</P>
<P>Do you know h<FONT size=3D1>ow to remove all rows in datagrid?</P>
<P></FONT>datagrid.TableStyles.Clear() seem does not work to me.</P>
<P>Thanks,</P>
<P>Dennis</P></FONT></FONT></DIV></BODY></HTML>
------=_NextPart_000_000A_01C4C289.CB075520-- Tag: Datagrid Border disappears Tag: 79951
Emailing from a Visual Studio.NET Application (Basic)
I'm sending eMail messages from my Visual Basic.NET application. Creating a
System.Web.Mail.MailMessage and sending it with SmtpMail.Send works fine, but
I'd like to take it a step further and hook up with the correct Mail Server
automatically, or, even better, deliver the message into the client´s actual
eMail application so he can use his address book to select the recipient,
etc. Can anyone point me in the right direction? At least as far as telling
me how to get the name of the Mail Server, if any, that the user is hooked up
with. As far as plugging into the Mail-client the user is using, perhaps
that's a lot of bother since the different clients ,Outlook, Outlook Express,
and (I shudder to mention it) Non-Microsoft mail clients may not accept the
same type of Message-object. Still, I'd be grateful for any input.
--
Gudmundur Karlsson
Iceland Tag: Datagrid Border disappears Tag: 79938
Transparent Label
I have a form that has a picture box with an image. I will also me placing
labels on this form in front of the picture box. I want the picture to show
through the labels. I would like the labels to be transparent. I have
tried setting the background color of the label to transparent, but all it
shows is the background color and you can not see the image behind it.
Is there any way to do this?
Thanks,
--
Eric Renken
Demiurge Software LLC
http://www.demiurge.us Tag: Datagrid Border disappears Tag: 79937
problem printing on a roll paper
OK After two month of development.. my App is ready.It is a client lotery
system and it is going to be deployed in many places around the city.The App
is going to use Tickets printers (I dont know the exact name) the problem is
that there are a lot kind of printers, when I made the printing test with an
EPSON TM-U200PD I notice that if I print a very long ticket, the printer stop
at an specific page size...
I want to print a Roll of information continue
NO matter what I did configuring the page size it did not print continue
I dont want to think the worst : I have to program an interface.. because
there are so many types of printers
where can I start to looking for the problem? Tag: Datagrid Border disappears Tag: 79936
MDI Form Click Event Detection
Hi,
I use Vb.Net with the Framework 1.1. I am coding a MDI form. I want to
show a context menu when the user right-clicks in the gray area of the mdi
form. The event MdiForm_Click doesn't fire. Why? Is there a workaround?
Thanks,
C. Tag: Datagrid Border disappears Tag: 79933
New Problem with Always on Top
Thank you for you help with the Always on Top issue previously posted. It
worked great. But, I have noticed that when I call a different form using
"ShowDialog" that the clipboard is still on top but I cannot access it. Is
there a way to make MyClipboard not effected by the other forms that are
displayed using "ShowDialog".
I am looking to copy information from Frm2.ShowDialog into MyClipboard and
paste it into Frm3.ShowDialog from MyClipboard...
Thanks.
Chuck Tag: Datagrid Border disappears Tag: 79930
textbox maxlength
Hi,
I looked everywhere for a reference to this, and I'm surprised that no one
else (apparently) has run into this problem.
I am using a textBox to collect/display messages as they are created in my
system. I append them to the current Text contents using the AppendText()
method. I never had problems with this until I moved to studio 2003 with
SP2. Now, no matter what I set my maxlength to (0, 500K, etc ...), the
AppendText() stops working once the buffer size reaches 32k. I'm sure it has
something to do with the SP2 patches related to overflowing buffers, but I
have no idea how to fix this (I definitely want to be able to put more than
32k into the textbox)
Any ideas ?
thanks,
mark Tag: Datagrid Border disappears Tag: 79929
Always on Top
Hello,
I am creating a clipboard that is always on top of my application. How can
I make my form (MyClipboard) always on top??
Thanks,
Chuck Tag: Datagrid Border disappears Tag: 79923
Winforms FAQ Datagrid Combo?
I have used this example to embed a bound combo within a datagrid.
It works very well, but with one exception.
If the user selects a value from the list, the selected value is not
actually shown until the control loses the focus. It always displays the
previous, or first entry in the list.
Once the control loses the focus, the correct value is displayed, but it is
a little confusing.
Any suggestions as to how I can get the display to update correctly?
The code can be found on the winforms site.
Cheers,
James Tag: Datagrid Border disappears Tag: 79915
Control(s) on top of C# form's MainMenu
How do I locate controls on top of the MainMenu for a C# form, in the same
way as PowerPoint does? (It has a Close button and a Restore button on the
very right side)
Thanks,
Valerie Hough Tag: Datagrid Border disappears Tag: 79911
IESourcing Problem w/ Threads
Hi,
I have a Windows Form that I embed in a HTML file.
The Form has a TextBox and a Button.
For simplicity sake, I am testing using a timer program, that should
display the elasped time on the TextBox.
I have a secondary thread that runs an infinite loop and every second
updates the TextBox (using MethodInvoker). And also pops up a
messageBox (I added this later to see if the thread runs).
The Button is used to manually update the TextBox, from the main
thread.
I tried this on my local computer, running the HTML file in IE, and it
worked perfectly. The TextBox updates automatically, the MessageBoxes
pop up.
Now, I tried the same thing from a computer on the network, it loads
the form fine, but doesn't update TextBox automatically, and no
MessageBoxes come up either on the client or the server. I don't know
if the thread even started at all. However, the Button still works, if
i click it, the textbox gets updated.
Any ideas on what I'm doing wrong? Tag: Datagrid Border disappears Tag: 79909
Order of Events on Form Creation
This seems a really basic question but I can't find an answer in the
help file, perhaps I'm looking for the wrong thing?
I want to load the previous settings for my app which will indicate
window size and position. I can't do it in the load event because the
form doesn't actually exist (or is not visible) at that point.
I put it in the form activate event with a flag so the settings are
only applied once but this seems a bit clumsy.
Is there an 'on first activated' or 'on first show' event that I could
us. I am currently trying 'OnCreateControl' but I am not sure that
makes sense.
Many thanks.
--
Jeff Gaines Damerham Hampshire UK Tag: Datagrid Border disappears Tag: 79908
AxWebBrowser and WM_PRINT unexpected failures
I'm trying to capture thumbnails of pages visited in a VB.Net app, in
circumstances where the window containing the AxWebBrowser is often not on
top.
For this reason, I'm using SendMessage of WM_PRINT to the browser control's
hWnd. (Also tried sending to a panel containing the browser control, with no
improvemtn)
The code itself essentially seems to work fine, because it captures the
thumbnail of the first page that the control visits. But if the window
containing the browser is then navigated BY THE USER CLICKING A LINK, rather
than by doing a new Navigate2, subsequent calls to the routine just return a
blank white bitmap with no content.
Starting again with a new location reached by Navigate2 goes back to getting
a valid bitmap. Clicking a link on the page breaks it again.
Sadly, cancelling all navigation events and inserting coded Navigate2 to the
same destination does not work either as a workaround - it results in a very
intermittent solution.
Any ideas?
The actual code used is the following (huge swathes of error checks omitted)
Private Sub PrintWindowToDC(ByVal hWnd As IntPtr, ByVal hdcDest As IntPtr,
ByVal Width As Integer, ByVal Height As Integer)
Dim hDC As IntPtr = GetDC(hWnd)
Dim hDCMem As IntPtr = CreateCompatibleDC(hDC)
Dim hBmp As IntPtr = CreateCompatibleBitmap(hDC, Width, Height)
Dim hOld As IntPtr = SelectObject(hDCMem, hBmp)
SendMessage(hWnd, WM_PRINT, hDCMem, PRF_CLIENT Or PRF_CHILDREN)
BitBlt(hdcDest, 0, 0, Width, Height, hDCMem, 0, 0, SRCCOPY)
SelectObject(hDCMem, hOld)
DeleteObject(hDCMem)
DeleteObject(hBmp)
ReleaseDC(hWnd, hDC)
End Function
Public Function GetControlAsBitmap(ByVal ctl As
System.Windows.Forms.Control) As Bitmap
Try
Dim g1 As Graphics = ctl.CreateGraphics()
Dim tempImage As Bitmap = New Bitmap(ctl.ClientRectangle.Width,
ctl.ClientRectangle.Height, g1)
Dim g2 As Graphics = Graphics.FromImage(tempImage)
Dim dc2 As IntPtr = g2.GetHdc()
Dim rv As Int32 = PrintWindowToDC(ctl.Handle, dc2, ctl.Width, ctl.Height)
g2.ReleaseHdc(dc2)
Return tempImage
Catch e As Exception
MsgBox("Failure during getcontrolasbitmap", MsgBoxStyle.OKOnly, "Error")
End Try
End Function
Private Function DoAbort() As Boolean
MsgBox("I got an abort")
Return False
End Function
Private callback As New Image.GetThumbnailImageAbort(AddressOf DoAbort)
Public Function GetControlAsThumbnail(ByVal src As Control, ByVal Width As
Integer, ByVal Height As Integer) As Bitmap
Dim bmp As Bitmap = GetControlAsBitmap(src)
Dim thumb As Bitmap = bmp.GetThumbnailImage(Width, Height, callback,
IntPtr.Zero)
bmp.Dispose()
Return thumb
End Function Tag: Datagrid Border disappears Tag: 79906
ListView Hot Tracking - missing functionality
Tribe,
Looking to see if anyone has coded up hot tracking for listbox or
listview controls.
Essentially it you do this:
ListViewItem hotListViewItem;
private void listView1_MouseMove(object sender, MouseEventArgs e)
{
ListView lv = (ListView)sender;
ListViewItem item = lv.GetItemAt(e.X, e.Y);
if (item != null)
{
item.BackColor = Color.Wheat;
if (hotListViewItem != null && !hotListViewItem.Equals(item))
hotListViewItem.BackColor = Color.White;
hotListViewItem = item;
}
}
You can make the rows track hot BUT there is an awful lot of flicker
when you do this. Anyone done this kind of thing and found an
alternative method?
Regards,
Dave Cline
~bangeye.com~ Tag: Datagrid Border disappears Tag: 79904
How to have MainMenu be parent of Control object
I would like to have a control I have created have a
System.Window.Forms.MainMenu as its parent. The menu will always have lots
of available space on the right side and I want to take advantage of this.
I tried to using the SetParent API but my control is not visible, even
though it seems to be in the right place. I also tried using
MyControl.BringToFront() in case this is a zOrder issue.
I see that in PowerPoint there are maximize/minimize buttons appear in the
exact place that I want my control, so it must be possible.
Thanks in advance,
Valerie Hough Tag: Datagrid Border disappears Tag: 79903
How to prevent more than one instance of form from being displayed?
I have a button on a main form that uses the following code to open another
window (this is NOT a MDI app):
Dim objCustomize As New frmCustomize
objCustomize.Show()
My problem is that if I click on the button again, it loads another instance
of the form so I now have two of the same form open. How do I prevent this
from happening?
Thanks in advance! Tag: Datagrid Border disappears Tag: 79898
Delayed displaying of a form?
Is there any way to delay initial displaying a form until all controls have
finished painting?
I find it rather annoying that I can actually see the some controls popping
up before the form has done drawing, as well as seeing scrollbars before the
associated control. This is ofcourse particularly bad on slower computers
and in cases where some controls are displaying lots of data (my grids and
trees).
I had considered something like setting the form visibility to false in
OnLoad, and then setting it true in Form.OnPaint, but unfortunately both
OnLoad and Form.OnPaint comes before each of the child controls' OnPaint. I
cant seem to find any event that fires after all control have been painted. Tag: Datagrid Border disappears Tag: 79894
Scrolling question...
I have two questions that I was hoping to get some input on:
1. How can I synchronize the horizontal scrolling of two controls on my
form? I realize that I will have to use the Windows API to do this, but I
haven't been very successful in determining exactly how. Are there any good
API references for .NET developers?
2. What would be the most efficient way to paint the background of a
scrollable user control in such a way as to suggest columns (using lines or
vertical bars of color, etc.) ?
If anyone can point me in the right direction, I would really appreciate it!
Thanks! Tag: Datagrid Border disappears Tag: 79892
the memory could not be read
Dear Sir
We did receive a memory error when we closing the program develop by VB.Net
The error message as below.
the instruction at "0x5047faa1" referenced memory at "0x14a390bc". the
memory could not be "read"
This .Net program included only one OCX develop by VB6 (SP6) and this OCX is
running well in VB6 exe program.
we include this OCX into VB.Net as well, It work fine as the VB6 exe
program. But system keep on popup the memory error message during we close
the VB.net program.
We also use this OCX in asp.net project and it giving a same memory error
problem during we close the IE6.
The OCX included components as below
-Microsoft Common Dialog Control 6.0 (SP6)
-Microsoft Windows Common Controls 5.0 (SP2)
-TeeChart Pro Activex Control v5
Note: The TeeChart Pro Activex Control v5 is 3nd component. We did post the
memory error to thay support forums. But they can't give us a sulation. even
the problem resaon. You can check the link below. Forum Title - Memory Erro
http://www.teechart.net/support/modules.php?name=Forums&file=viewforum&f=1&sid=895af797e2bc6bd2ccdd078318e423e5
Please! Please! Help me...
We really don't know hot to solved this problem.
Thanks
Cliven Tag: Datagrid Border disappears Tag: 79881
Memory could not be read
Dear Sir
I did receive a error message when I closed the windows form.
the instruction at "0x5047faa1" referenced memory at "0x14a390bc". the
memory could not be "read"
The windows form included the OCX develop by VB6 SP6.
This OCX without giving any error running in VB6 exe program. But when we
included this OCX in to VB.Net Windows Form and it popup the memory error
during we close the program. Anyway this OCX is running well in the VB.Net
Windows Form except the closing memory error popup.
We have same problem using the OCX in asp.net. When we closing the IE6. It
popup up the same memory error.
This OCX included few components as below
-Microsoft Common Dialog Control 6.0(SP6)
-Microsoft Windows Common COntrols 5.0 (SP6)
-TeeChart Pro Activex Control v5
Note: TeeChart Pro Activex Control v5 is 3nd component. We did post this
memory error to they support forums. But they didn't give us a sulotion. You
can check below the link. Forums Title - Memory erro
http://www.teechart.net/support/modules.php?name=Forums&file=viewforum&f=1&sid=fe919c28624f10882e51b9f16106d45f
We really don't know how to solved this problem and we don't know why the
memory could not be read.
Please! Please! Anyones can help me...
:'(
Thanks
Cliven Tag: Datagrid Border disappears Tag: 79879
CollectionBase class
I try to write a class derived form CollectionBase and hide the methods:
Clear() and RemoveAt().
In the documentation the methods are described as overridable (virtual). But
any try like following fails with compiler error:
public override void Clear()
{}
Error: cannot override inherited member .... because its not marked virtual,
abstract or override.
Isn't this possible, or what am I doing wrong? Tag: Datagrid Border disappears Tag: 79877
Open and close a word file
Hi,
I open a word file using ShellExecute. But I have to know when the open file
is closed. How could I know this? Is it possible or not?
Thanks in advance,
Ruslan Tag: Datagrid Border disappears Tag: 79875
source of text in a drag-drop operation
Hi,
I'm using C#, and what I'd like to do is this. I'm dragging text from
an external application (such as word, internet explorer, ect... I
won't the source at runtime), and dropping it into a custom tree view
control.
I'd like the windows form to be able to collect some meta data about
the source of the text, like the application that it came from, and
the filename (word), or the url (ie), etc.
For example, if I have some text in a word document, and I drag it
over to my tree view control, I want the tree view to be able to know
that the source of the text was a word document, and what the file
name was that the text came from.
Is this possible?
Thank you,
Ben Tag: Datagrid Border disappears Tag: 79870
english and spanish format mixture
I have a VB.NET App and Access DB(Spanish), Win XP(Spanish) .. I have notice
that for some operation (insert..etc)I need to set the format of dates to
english and sometime I need to ser the format of dates to Spanish so in order
to the program run well for every function I have to mix the formats, It is
not logical
What is the best practice to setup once the dates in a application?
Ken Tag: Datagrid Border disappears Tag: 79869
Change Highlight Color in a Textbox
Hello,
Looking for help changing the Highlight color in a Textbox in VB.NET.
Any Suggestions will be greatly appreciated.
Thanks,
Chuck Tag: Datagrid Border disappears Tag: 79866
key to parent
I have a control that has a textbox embedded in it. This control is
sitting on a form that also has an ok button that is the default
button that closes the form (OK button). When that textbox has focus
and a user presses enter, the default button fires. So to stop this I
am overriding cmd key. However, the processing for the enter key
actually needs to happen in the parent. I have tried hooking the
onkey events and such from the textbox into the parent control but
none of them fire when there is a default button on the same form.
To fix this I could hang a delegate off the textbox and subscribe to
it from the parent and call it when the processcmdmessage is fire in
the textbox, but I'd rather avoid that. What I would really like to
do is find some way to send the key from the textbox to the parent
control cleanly through the message que. How exactly would I go about
doing this AND is this even the best approach for the end result that
I am needing? Tag: Datagrid Border disappears Tag: 79865
One-Way DataBindings?
Hi,
I have a form with two controls, one button and one textbox. At form load I
add a databinding between the text property of the textbox and a public
property MyValue of the form which gets and sets a string field. The string
is initiated with the text "default" which also is what the textbox
initially shows after the databinding has been added. When editing the
textfield (and after tabbing out) the string field is updated as it should.
However, I would also like the textbox string to change whenever the MyValue
property is set from elsewhere in the form without having to set it
manually. Shouldnt this be done automatically since I have added a
databinding between these two properties or is a databinding "one-way" only?
/Andreas Tag: Datagrid Border disappears Tag: 79863
How to calculate "physical" width of string
Hi all,
I'm trying to create a read-only RichTextBox that will dynamically adjust
it's width to the string I throw into it.
It should be a perfect fit. I must use RichTextBox, because some of the text
can be in different color or be
bolded.
RichTextBox.Size doesn't work, since it is only an approximation.
Does anyone know how to calculate that??
Thanks,
Marcin Waligora Tag: Datagrid Border disappears Tag: 79859
Delete Record
I am new to coding and vb. I need some help on how to delete a record from a
datagrid that I have in a form. I am unable to locate any info on the web
(it seems as though it is all asp) or from the help file. Below I have given
two examples of code that I am working with, one is to load my datagrid and
the other is to update my datagrid. Can someone please help with deleting a
record from my datagrid?
Private Sub Book_Load
School11.Clear()
OleDbDataAdapter1.Fill(School11)
End Sub
Private Sub btnUpdate
Dim mynumber As Double
Me.BindingContext(School11, "Student").AddNew()
OleDbDataAdapter1.Update(School11)
MessageBox.Show("Database has been updated")
btnReload_Click(sender, e)
Me.BindingContext(School11, "Student").Position =
BindingContext(School11, "student").Count + 1
mynumber = Val(txtPhoneNumber.Text)
txtPhoneNumber.Text = Format(mynumber, "(###)-###-####")
End Sub Tag: Datagrid Border disappears Tag: 79857
Combobox Question..!
Good Morning,
I'm want to display names in a combobox. The problem I have is with
duplicate names, I want to update or retrieve information on a certian person
but if there are dups I get the wrong one. How do I load the names into the
combobox and an identity field to tel them apart.
Thanks..
Jim Tag: Datagrid Border disappears Tag: 79856
DrawGrabHandles Subclassing problem
Hi,
Im just wondering if anyone has come across a problem like this:
I am writing a Resource/Dialog editor in C#. I want to allow resizable
grab handles like .NET dialog editor does. So I decided it would be
best to subclass from the Windows.Forms.Control class, so I could do
the resizing for the handles.
class GrabHandle : System.Windows.Form.Control
{
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
ControlPaint.DrawGrabHandle(e.Graphics, this.ClientRectangle,
true, true);
}
protected override void OnMouseDown(MouseEventArgs e)
{
// Create event handlers for mouse down
}
...
...
}
The problem is that OnPaint() never gets called, either does
OnMouseDown().
If there is anyone out there who has experience a similar problem,
then I would really like to hear from them.
Keith Tag: Datagrid Border disappears Tag: 79855
How trust in File system operations
hi
I'm using VB.NET
I will be deploying my app on machines with Win98 also I'm using the
Interop.JRO.dll file in order to compact a local Access DB.. I´m using this
code to save the Db before to compact this (just in case something is wrong
in the operation..It already happened to me.. I dont know why)
If Not Directory.Exists("\temp") Then
Dim direc As DirectoryInfo = Directory.CreateDirectory("\temp")
File.Copy("my.mdb", "\temp\my.mdb")
Else
File.Copy("my.mdb", "\temp\my.mdb", True)
End If
I don't trust in the file system operation (or windows whatever..) is it
possible to include the file system operations into something like a
transaction in order to be sure that if something unexpected happens
everything will go to the original state?
any sug beside this
Ken Tag: Datagrid Border disappears Tag: 79848
Do web services make sense for me?
I have an existing ASP/ MSSQL project that we are looking at migrating to
VB.Net (standalone app, not ASP) which will still interact with a single
central SQL server. Because we have a requirement to "filter" data returned
depending on the user's permission to certain classes of data we hava all
access implemented via stored procedures. Another reason for using SPs is
that certain tables have a requirement to keep track of who made changes,
what the change was (old and new data), and when the change happened. Given
these requirements, it appears to me that adding a web service simply
inserts another layer between the user and the database, and one that is
going to require that I define a Command object for each stored procedure
call. Are there advantages that I am not seeing, or am I better off just
having my application create the necessary data objects that directly query
the database?
TIA
Ron L Tag: Datagrid Border disappears Tag: 79847
NullReference Exception in WebService.dll
Dear All,
I have been getting NullReference Exception in WebService.dll from
the last week...and I have used CLR debugger to trace the
problem...this gives me first chance exception (NullReference
Exception in WebService.dll)...
The following is what I have been doing...
oForm = Activator.CreateInstance(MyForm...)
oForm.Show();
oFrom.LoadData();
In LoadData() function I have create a WebService proxy Object and
call a method...
This is where it was failing...
When I check via CLR debugger I found that the oForm.IsHandleCreated
is null...and the internally WebMethod was called via
this.Invoke(....) (where this is the proxy Object)...
I have changed my code in LoadData function to check
if(! this.IsHandleCreated)
this.CreateControl
This seems to have solved the problem....but I would like to know if I
have understood and fixed the problem properly...
Invoke requires Message handle...the proxy object uses the Form's
Message Handle...when the method is invoked WebService dll gets a Null
reference of this message handle...and throws first chance
exception...
Have I understood this problem right? Have I implemented a proper
solution...
Please advice...
TALIA
Many Regards
Jack Tag: Datagrid Border disappears Tag: 79844
ComboBox in DataGrid problem
Hi
In my VB-windowsforms project I have several forms with datagrids including
comboboxes (derived from DataGridTextBoxColumn). They all works fine on all
machines which have Developer Studio 2002 installed. The problem appears when
I execute the application on our test machine (where VS2002 is not
installed). All datagrids works fine except one datagrid which have three
combobox columns. It behaves like an idiot, the event handlings seems to gone
mad. When I click in the first comboboxcolumn there should appear an extra
row in the datagrid and the ComboBox will be visible. The ComboBox appears
but no extra row is inserted. Then, when I leave the ComboBox, the
combobox-value disappears and three new rows appears!!! I think there must be
a missing file of some kind on the test machine. I have compared the files in
the System32 cataloge on the machines and discovered some files (mfc70chs.*,
mfc70cht.*, mc70d.*, msvci70.*, msvci70d.*, msvcp70.*, msvcp70d.*,
mschrt20.ocx, msmask32.ocx, net1.exe, sqlstr.dll, wmerrenu.dll, at170.dll,
at170.pd6, hha.dll) that was missing on the test machine. I copied the
msv*.dll-files into System32 on the test machine, tried to register them, and
run the application again but it doesn't made any difference.
I'm desperate!!! What should I do? Does anyone have a suggestion?
--
Thanks in advance
/Karin Tag: Datagrid Border disappears Tag: 79843
Beginners question on WinForms
Hi,
Yesterday i tried to make my first Vb.net Winform application and i
struggled with the following:
I build a form with a mainmenu. I made the form (form1) a mdi form.
Now i want to click on a menu item and then another form (form2) has
to open in de mdi container. All this was going good. But when i click
the menu item again the same form opens twice. And when i click again
a third form is openend. How can i achieve that only one instance of
the form2 is openend?
Can someone help me with this one?
Greetings,
Mark Tag: Datagrid Border disappears Tag: 79838
multi colour text in textbox
Hi,
How do I make a textbox where the tekt can have different colour. I have
tried to make a derrived class of the textbox class but couldn't quite get it
to work.
Thx
Simon Tag: Datagrid Border disappears Tag: 79835
Want a multi-line textbox that understand HTML
This is a multi-part message in MIME format.
------=_NextPart_000_002D_01C4C0EB.C3886540
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
How can I create one? Or where can/buy I get one?
Thanks,
Dennis
------=_NextPart_000_002D_01C4C0EB.C3886540
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2180" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>How can I create one? Or where can/buy I get =
one?</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Thanks,</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Dennis</FONT></DIV></BODY></HTML>
------=_NextPart_000_002D_01C4C0EB.C3886540-- Tag: Datagrid Border disappears Tag: 79830
IBindingList AllowNew is FALSE!!!
Hi Anyone,
I am beyond frustrated with the .NET databinding. I have custom business
objects and collections for each which implement the IBindingList interface
and inherit from the CollectionBase. Several of my business objects contain
collections of other business objects up to three or four levels deep. For
the most part they work perfectly but there is one case for which everything
goes haywire. When my objects are bound to listboxes and the collections are
empty the CurrencyManager keeps trying to call the AddNew method of the
IBindingList interface. I don't see how this is possible considering the
AllowNew property is set to false on all of my objects. I don't work in
datagrids so have no need to implement this portion of the interface. I need
help...
Thanks in advance,
Nathan Tag: Datagrid Border disappears Tag: 79827
The inital datagrid looks fine, but when I fill it the border turns white.
Not sure what property is controlling the border color.