vc++.net exporting database
i am developing a user interface prototype using windows forms in a vc++.net
environment. i have a database(ms-sql) which contains the necessary data for
displaying in a complex datagrid.
when i create a setup file of my prototype user interface, how can i include
the database along with it? i wuld want to be able to do this so that when
the application is installed on an other machine, i would want the datagrid
to display the data items.
thanx in advance Tag: Increate ListView row height Tag: 79032
Question about printing
Dear all,
I'm new in printing in VB.NET 2003 and want to print a run-time generated
form which contains line drawing shape and text. I found that PrintDocument
is good for printing by code but not for entire form. Actually it is not a
kind of report but label sticker so I don't think Crystal Report is my
choice. Does anybody have idea on my issue?
Thanks for your attention and kindly help!
Regards,
James Wong Tag: Increate ListView row height Tag: 79030
DateTimePicker - Time value?
How do I stop my DateTimePickers storing a time value? I just need to insert
the date part into my database but the DateTimePicker.Value property seems
to be in the format ##/##/## ##:##:## Tag: Increate ListView row height Tag: 79028
Windows User (Human) Interface Guidelines?
Apple's got this document:
http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/index.html
or
http://tinyurl.com/vgge
Is there any such guideline document targetted at gui designers on the
Microsoft Windows environment(s)? Any links will be greatly appreciated!
Kind regards
Abdullah Tag: Increate ListView row height Tag: 79027
how to print form???
hi all,
how can I print the form at design time as well as at runtime. In VB6 there
was a option in File menu to print form and there was method of form
PrintForm.
How can I do the same in dot net????..
any suggesstion will be appreciated..
Ansari Tag: Increate ListView row height Tag: 79025
Help!!! Visual Inheritance......
Hi,
I want to know if I'm doing something wrong. I'm inheriting frmChild
from frmBase in Project1. frmBase is referring to its MdiParent in a function
call from Form_Resize event. When I try to open the designer for the frmChild
it throws an exception for this, saying "Object reference not set to an
instance of an object."
Why is this happening. Does that mean I cannot use any runtime
instanciation in a base form? Or do I have to turn something off? Why is the
code executing in the designer. If I give a message box in the base form, it
pops up when I am loading the Child form!!!!!
Any help is appreciated..
Thanx,
Debi Tag: Increate ListView row height Tag: 79021
Main Menu Toolbar Icon is not coming out.
I have a Main Menu coded in VB.Net, which contains a Toolbar on top. There
are 10 buttons with image on the Toolbar.
During design time, the image on the Toolbar button can be displayed. But,
during runtime, all images on the Toolbar button cannot be displayed out. Why?
Thanks. Tag: Increate ListView row height Tag: 79020
Why does transparency only work sometimes with 32 bit color depth?
I have an application that uses transparency. My video settings are
1600x1200 and 32 bit color. I can make the main dialog transparent but
other controls and child windows are not transparent, I see the colored box
around my control. If I switch my color depth to 16 bit everything is fine.
Why does it work on some forms but not others.
I can even make my main form transparent and drop a custom control that has
transparency set. The main form goes transparent but the custom control has
a blue (my transparent color) box around it. Again if I switch color depth
it works fine.
I heard that somewhere in the .NET documentation it says transparency is not
supported under 32 bit color. I have a hard time believing this. Are there
any computers that don't come in 32 bit color mode anymore?
Jim Tag: Increate ListView row height Tag: 79008
Memory leak - Forms with Owners
I have created a project that has two forms. Form1 has a button which
runs the following code:
private void button1_Click(object sender, System.EventArgs e)
{
Form2 f = new Form2();
f.Owner = this;
f.Show();
f.Close();
this.RemoveOwnedForm(f);
f.Dispose();
f = null;
}
Using .NET Memory Profiler (http://www.scitech.se/memprofiler) I am able
to see that Form2 is not disposed. This seems to be a huge issue. Has
anyone experienced this problem? Is there a workaround? Have I done
something incorrectly?
If I remove the line where the Owner is set, there is no problem with
Form2 being Disposed.
Thanks,
Nate Tag: Increate ListView row height Tag: 79001
Memory leak - Forms with Owners
I have created a project that has two forms. Form1 has a button which
runs the following code:
private void button1_Click(object sender, System.EventArgs e)
{
Form2 f = new Form2();
f.Owner = this;
f.Show();
f.Close();
this.RemoveOwnedForm(f);
f.Dispose();
f = null;
}
Using .NET Memory Profiler (http://www.scitech.se/memprofiler) I am able
to see that Form2 is not disposed. This seems to be a huge issue. Has
anyone experienced this problem? Is there a workaround? Have I done
something incorrectly?
If I remove the line where the Owner is set, there is no problem with
Form2 being Disposed.
Thanks,
Nate Tag: Increate ListView row height Tag: 79000
WM_KEYDOWN, WM_CHAR and WM_KEYUP
I am using SendMessage() to send characters to a window. After using
Microsoft Spy++ to look at window messages when I click a key, I noticed
that the enter key sends WM_KeyDown WM_Char and WM_KeyUp but the home key
only sends WM_KeyDown and WM_KeyUp. Is there some rule I can use to tell if
I should send the WM_Char or not? Tag: Increate ListView row height Tag: 78986
exceptionless exceptions in masked edit box
Hello,
I encountered something to that, even though I have worked it out for
myself, I thought should be passed on.
While I was debugging an event handler (Validating) for a masked edit
box, I suddenly found myself 'back in the UI'. The line of code that
precipitated the surprise exit from the event handler to the UI happened to
generate a null reference exception, but no detectable exception was reported
(either in the IDE debug run or in the released program).
The line of code was not in a try/catch block (there are others in the
handler and, when appropriate, they are triggered). It was the true source
of the bug being worked on, but it was not detected until much later in the
code because as far as anyone knew the event handler validated the control
quite nicely.
I figure that whatever 'hidden' code calls the event handler does so from
within its own try/catch block. When it encounterd this particular
exception, it simply returned execution to the 'UI thread' (no explicit
multi-threading was used in the program, that descriptive phrase was intended
to limit verbiage (looks like I failed there)).
I don't know if this is just an issue with the masked edit box or with
more controls.
Thought you'd like to know,
mklapp Tag: Increate ListView row height Tag: 78983
ok to use threading in winforms for remote connections?
Is it proper to use threading in winforms to retrieve data from a remote sql
server? I thought about setting the timeout period in the connection string,
but what would be better is to start my bind() function in a new thread so
the app isn't tied up searching for the sql server.
Any problems I should be aware of?
-Max Tag: Increate ListView row height Tag: 78982
How TO DO VS.NET Resizable Tear Off MDI(s)
Does any body know how to do visual studio.net style resizable tear off MDI(s)?
I have played with the new splitter tool in vb.net 2005 and it is somthing
like what I am trying to do but it doesn't have closing or push pen abilities.
--
Think, Speak & breath Code! Tag: Increate ListView row height Tag: 78980
Stream Writer
Hello,
I have created a MemoryStream that is holding Binary Data. How do I get the
Data out of the Memory Stream into a file on my hard drive. All the
examples I have seen for a MemoryStream write the contents to the console.
Thanks
Chuck Tag: Increate ListView row height Tag: 78972
Inherited Form Designer gives Exception
Hi,
I have Project1 in which I have frmBase. I compiled the code and then
added an inherited form(frmChild) to the project which inherits from
frmBase. When I open the designer for frmChild the designer throws an
exception, "Object reference not set to an instance of an object."
Please help, what should I do to use inheritance within a project.
Thanx,
Debi Tag: Increate ListView row height Tag: 78971
Global connection strings?
I have a question regarding connection strings. Most of my apps have
multiple forms each of which stores a connection string back to (generally
speaking) the same SQL db (i.e. it's set up the way that VS.Net appears to
work by default).
Is there any advantage in having some kind of global connection string?
(...apart from the obvious one about making it easier to update if the db
moves to a different server...). What is best practice?
Thank you Tag: Increate ListView row height Tag: 78970
this.size doesn't come out to 1024*768
it says
width: 1030
height: 774
I have my form maximized.
what causes this discrepancy, and how do i correct it? I can notice that the
contents on the screen are not centered.
thanks again! Tag: Increate ListView row height Tag: 78969
Default file type handlers
Is there a way to get the path to the application that is the default
handler for a given file type w/o having to manually crawl around the
registry? Tag: Increate ListView row height Tag: 78966
LinkArea not Deserializable
Create a form, drop a LinkLabel on it, and set the form's Localizable
property to True in the designer. If you run this with full trust, everything
works. Run it without full trust (by going to the command line and running
\\localhost\...\program.exe) and you will get the following exception:
System.Security.SecurityException: Request for the permission of type
System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.CheckSecurity(ParseRecord pr)
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ParseObject(ParseRecord pr)
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Parse(ParseRecord
pr)
at
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
at
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler
handler, __BinaryParser serParser, Boolean fCheck, IMethodCallMessage
methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream
serializationStream, HeaderHandler handler, Boolean fCheck,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
at System.Resources.ResourceReader.LoadObject(Int32 pos)
at System.Resources.RuntimeResourceSet.GetObject(String key, Boolean
ignoreCase)
at System.Resources.ResourceManager.GetObject(String name, CultureInfo
culture)
at System.Resources.ResourceManager.GetObject(String name)
at
Clientele.Utility.DbHealthChecker.ConfigurationSettingForm.InitializeComponent()
at Clientele.Utility.DbHealthChecker.ConfigurationSettingForm..ctor()
at Clientele.Utility.DbHealthChecker.MdiMainForm.MdiMainForm_Load(Object
sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
Basically, this stops us from using a LinkLabel when our forms are
localizable and the EXE isn't run with full trust. Tag: Increate ListView row height Tag: 78965
DataGrid cell double click event
How can I know every time a user made a double click in a cell of my dataGrid?? Tag: Increate ListView row height Tag: 78963
WS_EX_LAYERED/LockWindowUpdate problem
Hello,
I use LockWindowUpdate() API function through P/invoke to prevent updating
form content while updating/removing/adding something in form (child
controls). Despite of the bug in W2k (Q270624, Layered Windows Disappear
During Calls to the LockWindowUpdate() Function) I do something like this:
1. Remove WS_EX_LAYERED attribute from form through SetWindowLong API
2. Call LockWindowUpdate
3. some updates (adding/removing child controls through standard .NET methods)
4. Call LockWindowUpdate - for form unlock
5. set back WS_EX_LAYERED flag on a form
6. redraw form
but on W2k after a point 5 form disappears and I cannot resolve this issue.
Thanks in advance
-bda- Tag: Increate ListView row height Tag: 78960
drawing text, autosizing textbox, flickering ...
Hi (VS.Net 2003 + SP),
how to make anchored textboxes, toolbars or statusbar not to flicker on
resize?
And one more thing, I wanted to make multiline textbox to autosize in height
and width. Since autosizing is done only in singleline, I used
prefferedSize= Graphics.MeasureString(control.text, control.font)
to get required size. But after resizing textbox, I saw that it is too wide
and height is less than required. So I tried to paint text myself. Then I
saw, that everyline of that text is painted differently (using standart font,
same text on every line), changing text to Arial 9pt, helped a bit. But
anyway it is too wide and height is less than required for textbox. How to
implement full autosizing for textbox? Tag: Increate ListView row height Tag: 78951
Status images in DataGrid
Hello,
is there any way how to use first column (RowHeader) to display custom
images (e.g. status icons)?
Thanks a lot
Vladimir Tag: Increate ListView row height Tag: 78946
Display deleted rows in DataGrid
Hello,
I use DataGrid that displays data from DataTable. When I delete a row, this
row disapears in DataGrid and changes it's status in DataTable.
I there any way how to display everything what's in DataTable?
I want that user will see all changes made and after clicking some "Commit"
button those changes will be saved into the database.
Thanks a lot
Vladimir Tag: Increate ListView row height Tag: 78944
using F7 as shortcort doesn't work?
Hi,
I am having trouoble using the F-kesy as shortcuts.
The shortcut is defines like this (c#):
btnRun.Shortcut = Shortcut.F7;
I have provided the button with a valid eventhandler that works just fine
when pressing the button, but pressing the F7 key doesn't trigger anything
at all.
All my other shortcuts that doesn't use F-keys are defined in the same and
they work just fine.
Has anyone experinced the same problems and maybe found a solution?
Thank you.
Torben Tag: Increate ListView row height Tag: 78943
DataGrid - reduce flicker-free
hi,
How to make datagrid flicker-free? I have tried to set ContorlStyle double
buffering options, but seems not working well.
thanks Tag: Increate ListView row height Tag: 78938
Unable to keep form on top
I'm trying to create a screensaver using managed directx, but the same
happens with the wizard generated screensaver project in VC# 2005. Any
window set to "always on top" is not getting obscured, like the standard
windows screensavers can.
I've tried setting the presentparams for the device constructor to
"windowed=false".
I've set the form property Toplevel=true, topmost=true, and called
.bringtofront().
Anybody know what I'm missing? Tag: Increate ListView row height Tag: 78934
Controls created on one thread cannot be parented to a control on a different thread
I am trying to make a window that pops up, to show that my application
is busy. I want it to be able to be called from anywhere, any thread,
so I put it as a static method in a class.
Code listed below.
The problem is, no matter what I can think of doing, I get the
following exception:
"Controls created on one thread cannot be parented to a control on a
different thread"
Trace:
at System.Windows.Forms.Control.MarshaledInvoke(Control caller,
Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[]
args)
at UI.Waiter.Busy(Object waitOn)
or i used to get this with a slightly different configuration (same
exception):
Trace:
at System.Windows.Forms.ControlCollection.Add(Control value)
at System.Windows.Forms.ControlCollection.Add(Control value)
at UI.Controls.WaitForm.InitializeComponent()
at UI.Controls.WaitForm..ctor()
at UI.Waiter..cctor()
Anyone got any ideas... or am i going about it the wrong way all
together!?
Cheers
Greg
----- CODE -----
using System;
using System.Collections;
using System.Threading;
using System.Windows.Forms;
namespace UI
{
/// <summary>
/// Summary description for Waiter.
/// </summary>
public sealed class Waiter
{
private static ArrayList _list = new ArrayList();
private static Mutex _lock = new Mutex();
private static Controls.WaitForm _form = null;
private static Form _parent = null;
public static Form Parent { get { return _parent; } set { _parent =
value; } }
private Waiter()
{
}
private delegate void BusyDelegate( object obj );
public static void Busy( object waitOn )
{
if( _parent != null )
_parent.Invoke( new BusyDelegate( InternalBusy ), new object[] {
waitOn } );
}
private static void InternalBusy( object waitOn )
{
// this has to be done here for threading reasons
if( _form == null )
_form = new Controls.WaitForm();
// show the waiting form
_lock.WaitOne();
try
{
_list.Add( waitOn );
if( _list.Count == 1 )
{
_form.Restart();
_form.Show();
System.Windows.Forms.Application.DoEvents();
}
}
finally
{
_lock.ReleaseMutex();
}
}
public static void Ready( object waitOn )
{
_lock.WaitOne();
try
{
_list.Remove( waitOn );
if( _list.Count == 0 )
{
_form.Hide();
}
}
finally
{
_lock.ReleaseMutex();
}
}
}
} Tag: Increate ListView row height Tag: 78931
embedded powerpoint diasshow
Does anyone know how to embed a powerpoint presentation in a windows forms
applikation. I can't find any documentation on how to do this anywhere. Seems
there isn't an Active-X control for viewing powerpoint presentations from
within another application.
Regards
Ole Inselmann Tag: Increate ListView row height Tag: 78920
Problem using SHBrowseForFolder
I am using VS 2003, .net 1.1
I am trying to use the SHBrowseForFolder dialog, as wrapped up in a
component from CodeProject (I don't have the URL handy).
The dialog appears, but the treeview does not.
I get the same result using the old .net 1.0 method with
FolderNameEditor and FolderBrowser(). It used to work before I
upgraded to 1.1 .
Any suggestions?
TIA,
Art Tag: Increate ListView row height Tag: 78918
fileacces problems
Hi,
I'm in the middle of developing a c# project.
When I run my application from VS.net it's run from the projects bin\debug
library.
My problem is, that when closing the application I am writing a xml file
containing some settings to this library, but I get an "Access denied
error". I am experiencing this error because the debug folder is marked as
"read only".
It doesn't matter if I uncheck the "read only" checkbox, because everytime
my project is compiled, it is set again.
How do I change this, and why is the acces to this folder restricted to
"read only"?
Thank you.
Best regards
Torben Tag: Increate ListView row height Tag: 78915
How to make a UI which resembles the VS.NET 2003 IDE UI
Hello!
The VS.NET 2003 user interface has very nice details. The small areas which
look like windows and which may slide away if you don't need them for the
moment.
Can't some of you illustrate a bit how such details may be built?
Best regards,
Henrik Dahl Tag: Increate ListView row height Tag: 78913
Autocomplete combobox
For all of you who are searching for auto complete functionality in
.net combobox. I wrote this code yesterday after being unable to find
something usable and workable on the internet. All examples that I've
tried either bulky and simply not elegant and inefficient or does not
work properly. Maybe I was just not lucky and patient enough to try
more examples :) instead I wrote my own code. Hope it helps someone. I
appreciate all comments and bugs in the following code being posted
back to the group.
Regards,
Michael Shapiro
P.S. call this sub from KeyUp event of the combobox
Public Sub AutoComplete(ByVal cbo As
System.Windows.Forms.ComboBox, ByVal e As
System.Windows.Forms.KeyEventArgs)
Dim index As Integer
Dim p As Integer
Select Case e.KeyCode
Case Keys.Back, Keys.Left, Keys.Right, Keys.Up, Keys.Down,
Keys.Delete, Keys.Tab
Return
End Select
p = cbo.SelectionStart
index = cbo.FindString(cbo.Text.Substring(0, p))
If index = -1 Then Return
cbo.SelectedIndex = index
cbo.SelectionStart = p
cbo.SelectionLength = cbo.Text.Length
End Sub Tag: Increate ListView row height Tag: 78911
Docked panels and Z-order problem.
Hallo=2E
I have two panels docked on the right of the form (p1 on the left=
and p2 on the right) and I want third panel to slide from right=
to left into a view between p1 and p2 (Just like Solution=
Explorer window in Visual Studio ? if it is in auto hide mode=
its slides to left when mouse is over it), but when I put my=
third panel on Controls list of the form, set it child index=
between those two and start to slide I have opposite effect ?=
the p1 is visible and p2 is hidden ? it is a way to do this=
right ???
--------------------------------
From: Dominik Jeske
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>yW8wOI8ZAk6AmAd7vIZBcg=3D=3D</Id> Tag: Increate ListView row height Tag: 78906
Problem with Z-ordering !!!
Hallo !!
I have two panels docked on the right of the Form (z order index=
p1: 0, p2: 1) and I want to third panel slide from the right=
between those two panels (just like in Visual studio when you=
put mouse over autohided SolutionExplorer its slides to view)=
but because of z-ordering when I put my control on the form and=
set his ChildIndex between those two I have opposite effect ? p2=
is hided and p1 is visible ? any idea how to do this right ?=
?????????
--------------------------------
From: Dominik Jeske
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>VZCLNlkgMEinfTjACsJSzg=3D=3D</Id> Tag: Increate ListView row height Tag: 78905
Form transparency issues
Recently I wanted to create a small little program that could sit=
on the desktop and not block the desktop wallpaper=2E There are=
two methods to accomplish this ( that I am aware of )=2E
1) create a solid color bmp as a background image and set the=
transparency key to match its color
2) specify the form's background color with a matching=
transparency key
Now my issues with both methods, but first it should be known=
that I have set the forms to have no border or title bar and=
have implemented code that allows me to click-and-hold anywhere=
( with exceptions listed below ) on the form and move it=2E The=
data actually displayed on the form is just text and one=
rectangle, all drawn by me ( there are no controls on the form=
itself )=2E
1) I have two issues with this method, although it is what I'm=
prefering to use at the moment=2E The first seems to be the=
discrepancy between how the program is handled when the=
computer's Color Depth is 32bit or when it is less than 32bit (=
16bit )=2E When the color depth is 32bit then I am able to click=
on the entire area the form inhabits ( even that which is=
transparent ) and move it, but if the color depth is less than=
32bit ( 16bit ) then only the drawn text or rectangle outline (=
since it has no fill ) can be clicked to drag the program=
around=2E Clicking on the transparent areas just passes the click=
through the form to whatever is below ( even when I know the=
form has focus )=2E I'd like to be able, regardless of the=
desktop's color depth, to click anywhere within the form area=
and move the application=2E
The second issue I have with this method occurs when I take my=
executable and put it on another PC ( my PC is XP Pro, the other=
PC is XP Home=2E=2E Both SP2 )=2E The problem is similar, but a=
little different=2E When the 2nd PC's color depth is at 32bit,=
the transparency does not work=2E The green/lime ( that's the=
transparent color I'm using ) background shows=2E Needless to say=
this is not acceptable=2E When I change the color depth to less=
than 32bit ( 24bit this time ), the transparency actually works,=
but I come across the same issue of clicks on the transparent=
areas just passing through=2E
2) With this method I have not tried it on a 2nd PC yet ( I don't=
have it available where I am atm )=2E Its basically the same=
"issue" as mentioned above with color depth less than 32bit,=
except it does it with a color depth of 32bit and 16bit=2E Clicks=
on the transparent areas just pass right through=2E I'm tempted=
to just go with this method and possibly make one area on the=
form that is meant to be used to drag it around ( similar to the=
idea of the box that appears to move tables in MS Word ), but=
I'm hoping there's a solution I'm unaware of before I do that=2E
Anyways, all of this brings up some interesting questions=2E
-What does color depth have to do with transparency handling?
-Does the version of XP ( Home or Pro ) handle transparency=
differently?
Probably some more questions also=2E
Not sure if it matters, but I'm doing all of this in C#=2E
So any ideas to get pass any of these issues?
Thanks in advance=2E
--------------------------------
From: othell m=2E
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>8xrsHvZKNkGRSJumCntIww=3D=3D</Id> Tag: Increate ListView row height Tag: 78904
Odd closing problem
I have a base form with a Cancel button (btnCancel) and a simple msgbox
routine. I would like to have a routine closing check to prevent loss of
data.
Dim i As Integer
i = MsgBox("Exit?", MsgBoxStyle.YesNo + MsgBoxStyle.Question)
If i = MsgBoxResult.Yes Then
Me.DialogResult = DialogResult.Abort
Me.Dispose()
End If
I have another form that inherits from the base form. In both parent and
decendent the Cancel button property of the form is set to (None).
The problem is this. Even given the above, even given that I've traced the
code and can see that the Me.dispose call is NOT being made when I click No,
the form still closes. Any suggestions as to what I might be overlooking? Tag: Increate ListView row height Tag: 78900
Formatting txtPhone
I have a txtPhone that I need to format like 555-555-5555 and when a user
inputs numbers it should only take numbers. Tag: Increate ListView row height Tag: 78899
strange problem with binding collection object to listbox control
I have a business object with two public properties - "OrganizationID" and
"OrganizationName". Pretty typical. We will call it Organization.
And I have a collection object which is an arraylist that stores a
collection of the business object described above. Let's call it
Organizations
I have a lstbox control. So I bind it Organizations to the listbox control.
lstSelectedOrgs.DataSource = null;
lstSelectedOrgs.ValueMember = "OrganizationID";
lstSelectedOrgs.DisplayMember = "OrganizationName";
lstSelectedOrgs.DataSource = Organizations;
I initially populate the control. Then I have a way to remove an item. And
then I bind it again.
At some point, all of a sudden, what shows up in the list box looks like
this.
MyNameSpace.Organization Tag: Increate ListView row height Tag: 78895
how do I set the version information?
How do I set the version of my app? I can do this in the setup app, but it
does not coincide with the actual application.
-Max Tag: Increate ListView row height Tag: 78894
Beta Readers Wanted - Whidbey C# - (O'Reilly Author)
This is a one time request for beta-readers for a new book I'm working on.
*************
I'm writing a new book on Visual C# 2.0 - target audience is C# 1.x
programmers looking to move up to 2.0 (code-name Whidbey).
The ideal candidates have been programming in Visual C# 1.x for a while, are
familiar with and comfortable with all the language fundamentals, delegates,
creating windows and web applications and so forth and are ready to learn
what is new in Visual Studio and C# 2.0, as well as highlights of what is
new in creating Windows and Web Applications.
I will post the chapters after I've written them but before they've been
edited or tech-reviewed. Your job will be to provide guidance and advice as
to how helpful the chapter is, what is missing, what could be clearer, etc.
You can expect to read (and respond to) about 40-50 pages per week through
Thanksgiving; starting next week. Ideally, you'll have the Visual Studio
2.0 Beta installed on a computer and will be able to try the exercises,
though this is not strictly required.
There is no financial compensation (though active participants will receive
a copy of the book when it is published, and an acknowledgement in the book
itself). You will need to sign a Non-disclosure agreement and you'll need to
join a forum on Delphi (membership is free).
If you are interested, please send me email (jliberty@LibertyAssociates.com)
with your name, email, C# experience, etc.
Thank you.
Jesse Liberty
Author:
Programming C#
Programming Visual Basic .NET
Programming ASP .NET
Programming Windows .NET Applications
Numerous other books
http://www.LibertyAssociates.com Tag: Increate ListView row height Tag: 78893
Logic Help
I need some help with user names and passwords (five users and one password
for each user). I have two txtboxes (txtName, txtPassword). If a user
clicks enter and both are empty then a message is displayed, "enter user
name." If just the name is entered the message "enter password." If wrong
name and right password then message "re-enter name." If right name and
wrong password message "valid name, wrong password." I cant figure this out,
can someone help me please? The names are tied to a passwords, for example a
user might have 123 for a name and a password of 456 Tag: Increate ListView row height Tag: 78879
Make checkbox larger
Who knows how to make the actual check box rectangle larger? Is the onlyway
to inherit from checkbox and override its paint method or something?
thanks Tag: Increate ListView row height Tag: 78865
Using designer without Forms
My program consist of different panel that I load and unload on a
form. I would like to be able to user the Form designer directly on a
panel without using a form since this panel will be put on a form at
run time. Any ideas? Tag: Increate ListView row height Tag: 78864
scrolling a user control
Hi,
I have created a user control which I then add standard controls to
prgramatically i.e. picture box, text box etc.
I'm just wondering if it is possible to scroll to given position in the
scrollable region? So lets say the control has a height of 300 pixels and the
scrollable height is 1000 pixels then I'd like to be able to just make pixel
500 appear in the top left of the controls visible area.
If this isn't possible what alternatives are there for scrolling a user
control programatically.
Many thanks in advance for any answers.
Best Regards,
Steve. Tag: Increate ListView row height Tag: 78861
Icon in tray with Windows Service
How can i get an icon in the tray to allow for service
control/configuration? I have tried allow service to interact, but it
didn't work like i wanted, i could see the icon but i couldnt do anything
with the context menu.
TIA. Tag: Increate ListView row height Tag: 78856
Error: Specified Cast is invalid
Hello:
Hope you can help me.
Below is the code in Windows Forms VB to Export
the "Notifications.rpt" Crystal reports to PDF. This
report is connected to a dataset.
The oRptNOTE.Export() line is failing. I am not sure
why.
Dim oRptNOTE As Notifications
oRptNOTE = New Notifications
oRptNOTE.SetDataSource(Dataset12.notification)
Dim DiskOpts As
CrystalDecisions.Shared.DiskFileDestinationOptions = New
CrystalDecisions.Shared.DiskFileDestinationOptions
oRptNOTE.ExportOptions.ExportDestinationType =
CrystalDecisions.[Shared].ExportDestinationType.DiskFile
oRptNOTE.ExportOptions.ExportFormatType =
CrystalDecisions.
[Shared].ExportFormatType.PortableDocFormat
DiskOpts.DiskFileName = "c:\temp\test2.pdf"
oRptNOTE.ExportOptions.DestinationOptions =
DiskOpts
oRptNOTE.Export() Tag: Increate ListView row height Tag: 78853
Client side controls in IE not working as expected
I am developing a windows forms user control that will be hosted within IE
from a web page.
For testing purposes and on the client machine, I changed the .NET Framework
security policy to give full access for the site that has the control. After
all this, IE shows the control fine without problems.
The problem happens when the control is signed with public private keys
pair, IE doesn't show the control but shows an empty box instead (like an
image link is missing or something)..
This is the HTML code i am using to host the control:
<OBJECT id="HelloWorldControl1" height="500" width="500"
classid="NetAppletCtrl.dll#NetAppletCtrl.HelloWorldControl" VIEWASTEXT>
</OBJECT>
Any comments why IE doens't show the control when it's signed. Do I have to
specify the strong name?
I tried a lot and couldn't figure out how.. Maybe it's a bug in IE!!
Thanks, Tag: Increate ListView row height Tag: 78851
mshtml and windows services
I have an application that uses the Ax web browser object. When I call the
IHTMLElement.click() method on an input button (<input type="submit"> or
<input type="button">), the click fires appropriately, if I'm running it
from a windows forms based application.
However, when I run the EXACT same code under a windows service, either as a
logged in user or as the local system account, the click fails to process.
Clicking on other elements (like <a>) works.
I've tried submitting the form directly, in cases where a submit occurs, but
can't do that either. Both GET and POST actions fail.
What am I doing wrong? Is there something that prohibits the onclick event
from firing for buttons when running as a service? Am I missing something?
Robert Tag: Increate ListView row height Tag: 78849
Hi experts
How can I increase individual row's height of the ListView control ?