Datarepeater
Hi, NG!
Is there any updated version (.Net) of the Datarepeater control or do I have
to use the old (VS6.0) version?
Thanks.
pax Tag: How can I limit the number of the applicatin' login trying ? Tag: 86131
How to set screen color depth and disable hardware acceleration in .net?
Hi,
Does anyboy know how to implement following 2 features in .net?
1.Change screen color depth
2.Disable hardware acceleration
So far, I know how to change screen resolution in .net, but havent found
solutions for above 2 requirements.
Looking forward to ur reply.
Thank,
William Tag: How can I limit the number of the applicatin' login trying ? Tag: 86129
At what point does the MDI parent become visible?
I want to put code that executes only once at the first available point after
the MDI parent form is visible so I can give feedback to the user while the
application is retrieving configuration data from a database and doing other
setup work. The _Load is too early because the form is not yet visible, and
_Activated seems not well suited because it fires too frequently. The
closest I've come is to use _Activated with a Boolean set after the first
call so the setup code doesn't execute, but it still seems ill-suited.
Any suggestions would be greatly appreciated. I'm a DBA by trade, so bear
with me. Tag: How can I limit the number of the applicatin' login trying ? Tag: 86128
best contol for capturing steaming and displaying streaming input?
I have a Windows forms application that is reading messages off off a queue,
and I want to stream them into a window to view. Currently I am using a
textbox classes/methods of textbox.Append(...) and textbox.ScrollToCaret()...
It seems that there is limit to the number of characters you can write to a
textbox...
I would appreciate any recommendations on the best contol/technique to used
to stream input into a form and to automatically advance the scrollbar as
input arrives. I want to capture several thousand lines before I cleanup...
thanks Tag: How can I limit the number of the applicatin' login trying ? Tag: 86119
Creating a 1bpp mask from a byte array
Hi
First of, I am posting to this newsgroup as it seemed best suited even though I am writing C++ for a standard Windows application. The application uses GDI+ which forms the basis of the System.Drawing namespace...anyway here goes:
I am trying to create a 1 bit per pixel mask to use as an overlay. The data for the mask i generated dynamically based on user input and is available as a byte array. I get the first failure when trying to create the mask bitmap, the code is a follows:
/**
* Utiliy method, creates a mask bitmap and modifes the palette accordingly.
* @param size Size of the mask.
* @param color Color of the mask.
* @param pixels The pixels.
*/
Bitmap* createMask( const Size& size, const Color& color, Byte* pixels ) {
Bitmap* mask = new Bitmap( size.width, size.height, ((size.width+3)>>2)*4/8, PixelFormat1bppIndexed, pixels );
UInt paletteSize = mask->GetPaletteSize();
if( paletteSize > 0 ) {
ColorPalette* palette = (ColorPalette*)malloc( paletteSize );
mask->GetPalette( palette, paletteSize );
if( palette->Count == 2 ) {
palette->Entries[0] = Gdiplus::Color::Black;
palette->Entries[1] = Gdiplus::Color::MakeARGB( color.GetA(), color.GetR(), color.GetG(), color.GetB() );
}
mask->SetPalette( palette );
free( palette );
}
return mask;
}
Since that didn't work, I tried letting GDI+ create a mask bitmap of the specified size and the copy the pixels into that bitmap. But when I try to display the image I either get nothing or a GPF. My display code is very simple:
// Bitmap *maskBitmap; // Defined elsewhere
Graphics g( hDC );
g.DrawImage( maskBitmap, 0, 0 );
So it basically just creates Graphics object and attempts to draw the image. The latter fails however...
Teis Johansen Tag: How can I limit the number of the applicatin' login trying ? Tag: 86118
HELP NEEDED REGARDING MAKING OTHER LANGAUGE (i.e. HINDI)ENABLED WINDOWS APPLICATION IN .NET
(Type your message here)
--------------------------------
From: kinshuk kukreti
hi every one
i am new to .net development
my problem is that i want to make a windows application
which could enable the user to enter data in HINDI language
i have seen their is some property of form like
LOcalizable ,language,IME Mode
and of text box like IME MOde
what i am doing is using MAngal font Which is used for Hindi Language
for text box and setting its IME Mode property to True at design time
i'm also setting IME MODE property of form to true and also setting LOCAlizable to true and LAnguage property to HINDI
i have also installed the IME 1.1
it is working fine with the MICROsoft Word
and showing a bar which displays Help etc.
But in .NET it not showing anything
but at run time i'm not getting the desired results
does any body here can help me
i'm sure i'm wrong some where
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>WAKtCPMagUiZGjwvLxsVrg==</Id> Tag: How can I limit the number of the applicatin' login trying ? Tag: 86116
making forms larger than screen size
(Type your message here)
--------------------------------
From: Zaher Zeidan
is there a way to resize a form so that it's bigger than the screen size of the windows??
I mean if you run your windows with 780x1024 resolution you won't be able to set your height or width to any thing larger than this..
this is really stupid from the IDE to prevent developers from resizing the form larger than the screen area since this would enable you to get a lot of space in design time and/or using scroll bars to put lot of controls in one window..
Old Visual Studio didn't have this limitation..
anyone knows a workaround for this???
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>/ORUU75l20+l5QvA6bsPPg==</Id> Tag: How can I limit the number of the applicatin' login trying ? Tag: 86114
CheckedListBox::SetItemChecked will not display properly on TabCon
Hi all
I have this checkedlistbox that appears on a winform that has a tabstrip
control. The tabstrip control has say more thatn 2 tabs. On the first tab
there is a checkedlistbox. The checkedlistbox first loads all possible items
from a database; say 10 options total for a user to select. I then make
another call to a database table that has the previously selected options for
the checkedlistbox. All the data comes back from the database fine. I am
able to use the SetItemChecked method to set which ever items in teh
checkedlistbox as checked, but when it finally is rendered on the screen,
none of the checked items show as checked. If I move the checkedlistbox to
another tab that is not to display at the time of rendering for the form, I
can select that tab and the items are checked.
I am wondering if any of you have seen anything similar to this. Thanks for
any assitance. Tag: How can I limit the number of the applicatin' login trying ? Tag: 86113
How to change the font in the grid?
My textboxes use Tahoma, 9. I want to use the same for my grid. Is is
possible? How do I do this?
I found this:
DataGrid1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,
Byte))
in another forum, but I'm getting "'Point' is not a member of
'System.Drawing.GraphicsUnit'."
If I change Point to Pixel, I get "Overload resolution failed because no
accessible 'New' accepts this number of arguments." Tag: How can I limit the number of the applicatin' login trying ? Tag: 86106
How to make the gray area of the grid white?
I'm developing an application for Pocket PC in VB .NET. My grid can contain
up to 10 rows, but my table has only 2 and I see the dark gray area. Is there
a way to change the color of it? 'DataGrid1.BackgroundColor' works for a
Windows Application, but not Smart Device Application... Tag: How can I limit the number of the applicatin' login trying ? Tag: 86105
Validating event not firing for a checkbox
Hi,
I am generically adding a handler for the Validating event of various
controls. When added to a checkbox, the event never fires. Any solution
here? Tag: How can I limit the number of the applicatin' login trying ? Tag: 86104
Data path changes after saving files with SaveFileDialog
Using VB.NET
I have the path to my Access file stored in an App.config file:
<add key="constring" value="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=Data/METL.mdb;Persist Security Info=False"/>
I usually set the connection like this:
'* Get the appSettings constring value (set in the web.config)
strConstring =
System.Configuration.ConfigurationSettings.AppSettings("constring")
'* Connects to database
ocnConnection = New OleDb.OleDbConnection(strConstring)
After creating an Excel file and saving it to a folder other than the
application folder, my database connections always try to find the database
file in the folder the Excel file was saved to.
If dlgSaveFile.ShowDialog() = DialogResult.OK Then
Excel.DisplayAlerts = False
Excel.AlertBeforeOverwriting = False
Excel.ActiveWorkbook.SaveAs(dlgSaveFile.FileName)
Excel.ActiveWorkbook.Close()
Else
Excel.ActiveWorkbook.Close(False)
End If
Thanks,
Sacha Tag: How can I limit the number of the applicatin' login trying ? Tag: 86103
Drag a tree view node on to a richedit
I want to be able to drag a treeview node, drop it on to a rich edit box and
when that event occures, insert some text into the rich edit at the location
that the node was dropped.
Possible? Any hints on how to do this, as I'm not sure where to start. Tag: How can I limit the number of the applicatin' login trying ? Tag: 86101
Windows app access db internet
Hi,
I built a windows form client app that access a db on a network. Now I was
wondering how can I set it up so that the app accesses the database through
the web? I don't want to rebuild the client app into an asp.net app. Maybe I
could or should use Web Services that sits on a web server with database and
do my updating through this route. What do you guys/gals think?
Thanks,
JJ Tag: How can I limit the number of the applicatin' login trying ? Tag: 86099
WinForm Behavior
Hi.
I´m developing an MDI aplication and I have a base form from where all child
windows inherits. The issue is that all the controls I place in the
inherited child form at design time use say Arial 12 font and the textboxes
are 20pixels hi, however at runtime everything ends up twice as large than
designed, like Arial 16 and textboxes 40pixels hi.
So far this is cool because I infact need to adjust the size of the controls
all over the aplication according to the resolution it is being running on.
However I don't know what feature is that and need to know what it is in
order to control it!
Any ideas? is it the base form used by the child windows or is something on
the MDI container that somehow "inherits" some property to the controls the
contain?
Thanks in advance,
Nando Tag: How can I limit the number of the applicatin' login trying ? Tag: 86095
Multirow listview (sort of)
I have a problem with my windows form.
I want to display items that doesn't fit on one row in a listview.
I would like to find a control which enables me to add all my columns but
one to the first row and the last column on the second row.
If it was a html-table an item would look like this
<tr><td>Column 1</td>
<td>Column 2</td>
<td>Column 3</td>
</tr>
<tr>
<td colspan="3">Column 4. Big.</td>
</tr>
It would be nice if the control would be similar to a listview in Details-view
(able to change the width and sort on the columns in the first row).
/nisse Tag: How can I limit the number of the applicatin' login trying ? Tag: 86093
What happens when WindowState =Minimized ?
Hi, i found unusal things happening when Program main window is minimized.
I'm writing large programm on C# and having problem whith memory size
allocated bu program.
Every time i use some dialog's ShowDialog() the memory size of process
increases.
But ones i minimize main window memory size decreases significantly (for
example : program that was just loaded whith 2 nonmodal dialogs takes 35 MB,
after Minimize and Restore it becomes 5 MB after restoring comes 8MB).
My questions are :
Which actions are take when window is minimized ?
How can I reproduse these actions in order to decrease used memory size
(Without Minimize & Restore)?
I tried with GC.Collect() it doesnt help.
Please help.. I need it very urgent.
Giga Tag: How can I limit the number of the applicatin' login trying ? Tag: 86081
An Application's forms
Is it possible to get a reference to a collection of all an Application's
loaded forms?
I want to do something like...
For each Form in Application.Forms
Form.ResetLocation
Next Form Tag: How can I limit the number of the applicatin' login trying ? Tag: 86080
How to import a text file from a WinForms to a db
How to import a text file from a WinForms to db
some one cam help me?
marco Tag: How can I limit the number of the applicatin' login trying ? Tag: 86078
Skip LinkLabel in TAB order
I have designed a custom control derived from UserControl which contains a
LinkLabel and a TextBox. If the user uses the TAB key to move the focus to my
custom control I want the TextBox to get the focus and not the LinkLabel.
Therefore I set the TabStop property of the LinkLabel control to False (in
the constructor of my custom control, after InitializeComponent()). However,
the TabStop property of the LinkLabel is ignored and it still gets the focus.
As a workaround I tried to override OnEnter of my custom control:
Protected Overrides Sub OnEnter(ByVal e As System.EventArgs)
myTextBox.Focus()
End Sub
Unfortunately this doesn't work either. The TextBox gets the focus but
immediately afterwards the focus moves to the LinkLabel. Overriding
OnGotfocus results in the same behaviour.
How could I prevent the LinkLabel to get the focus if the user uses the TAB
key to move the focus to my custom control?
Thanks for any ideas,
Guido Tag: How can I limit the number of the applicatin' login trying ? Tag: 86077
How to achieve the following functionality with Windows Forms ?
I have a useful framework, written in a different language (PowerBuilder),
which I'd like to replicate in .Net and Forms, but I'm unsure of how to
approach it, as the Event model is being used different between the
development environments.
Currently we have data entry screens, whose columns have been "wired" into a
class that performs checks on the entered data. As the user "leaves" a
column, the specific check / business rule is carried out. A lot of the
checks are common across all the screens and linking the column to the
specific method to be called is as easy a giving the column the appropriate
Name.
How can I create my own framework which would allow an easy method of
connecting / wiring the columns and the method checks together. I was
planning on using DataGrids, but can change that if I need to. Tag: How can I limit the number of the applicatin' login trying ? Tag: 86075
Inherited controls in worng location
Please can you explain the following...
I create a new form and add to it the following objects: a MainMenu, A
MenuItem, a PictureBox and a Button. I change the button properties so that
it is anchored BottomRight.
I then create another form which inherits from the first. And I add to it
another Button object. I then build my project. After the project has been
built the first Button object's location moves up by one pixel!
With some experimentation I've found this happens with other objects too but
equally, in some circumstanmces, if doesn't happen at all.
Can you explain why and whether there is a solution? Tag: How can I limit the number of the applicatin' login trying ? Tag: 86074
Urgent Help : Re-select Combobox Value
Dear all,
I'm doing a winform project which uses "ComboBox" in one of the form. The
winform contains "ComboBox" with the values as below: -
this.ComboBox1.Items.AddRange(new object[] {"Apple", "Orange", "StrawBerry"});
Users will select on of the item from the combobox and stored into database.
Users have the rights to update this record.
The question is, how do I select the combobox value base on the value from
database?
I have used "SelectedText", "SelectedValue", but it doesn't seem to be
working.
Please Help. Thanks in advance.
Cheers,
Mae Tag: How can I limit the number of the applicatin' login trying ? Tag: 86068
Form question (Re-usuable code)
Is there any way of making the following code into a function so that I
don't have to re-use the same code for all my buttons? I've tried to do this
with the code at the bottom of my post but I get a build error saying 'Type
FormToShow is not defined'.
Cheers,
Paul
Private WithEvents Example1Form As frmDragDropFromExplorer
Private WithEvents Example2Form As frmDragDrop
Public Shared Sub Main()
Application.EnableVisualStyles()
Application.DoEvents()
Application.Run(New frmMain)
End Sub
Private Sub btnExample1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnExample1.Click
Try
Example1Form.Show()
Catch
Example1Form = New frmDragDropFromExplorer
Example1Form.Show()
Finally
Example1Form.Focus()
End Try
End Sub
---- Tried this but got the error 'FormToShow is not defined' ---
Private Sub btnExample1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnExample1.Click
ShowForm(Example1Form)
End Sub
Private Function ShowForm(ByVal FormToShow As Form)
Try
FormToShow.Show()
Catch
FormToShow = New FormToShow
FormToShow.Show()
Finally
FormToShow.Focus()
End Try
End Function Tag: How can I limit the number of the applicatin' login trying ? Tag: 86062
Form question (Re-usuable code)
Is there any way of making the following code into a function so that I
don't have to re-use the same code for all my buttons? I've tried to do this
with the code at the bottom of my post but I get a build error saying 'Type
FormToShow is not defined'.
Cheers,
Paul
Private WithEvents Example1Form As frmDragDropFromExplorer
Private WithEvents Example2Form As frmDragDrop
Public Shared Sub Main()
Application.EnableVisualStyles()
Application.DoEvents()
Application.Run(New frmMain)
End Sub
Private Sub btnExample1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnExample1.Click
Try
Example1Form.Show()
Catch
Example1Form = New frmDragDropFromExplorer
Example1Form.Show()
Finally
Example1Form.Focus()
End Try
End Sub
---- Tried this but got the error 'FormToShow is not defined' ---
Private Sub btnExample1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnExample1.Click
ShowForm(Example1Form)
End Sub
Private Function ShowForm(ByVal FormToShow As Form)
Try
FormToShow.Show()
Catch
FormToShow = New FormToShow
FormToShow.Show()
Finally
FormToShow.Focus()
End Try
End Function Tag: How can I limit the number of the applicatin' login trying ? Tag: 86061
Windows Forms .NET 2.0 Advice
Hello,
I could use some advice. I have an application to build for a client the
must be developed as a windows form application. This is an application that
was written years ago using VB6 and an access database.
I am an experienced .Net developer, version 1.1 but have built web
applications, not windows forms.
Should I consider .NET 2.0 for this application? I do not have windows form
experience in .net so there will be a learning curve either way. Are there
enough new features in .net 2.0 windows forms to consider this?
Also, can you point me to any good docs on the subject.
Thanks
scott Tag: How can I limit the number of the applicatin' login trying ? Tag: 86060
Windows Form and Windows Form User Control - Where Is The Method That Would corresspond To A Web Form Pre_Render Method
Hello
MyMainWebPage.aspx contains MyUserControl.ascx
MyUserControl.ascx has a DataTable Property MyDataTable
MyUserControl.ascx has a DataGrid which whose datasource is MyDataTable (or
technically it's private accessor but that I don't think is an issue here)
MyMainWebPage creates a DataTable dt . I then do a
"MyUserControl.MyDataTable = dt"
In order for the data to appear in the user control grid I must do the
"MyUserControl.MyDataTable = dt" in the Pre_Render of MyWebPage
I want to do this type of thing with a window form and windows user control.
Where in the windows form user control would I bind the datatable? If I do
it in the user controls page_load it does show the data in the datagrid?
Thank you,
Richard Tag: How can I limit the number of the applicatin' login trying ? Tag: 86051
datagrid colum's nulltext property displayed in column when field not null
I have a record displayed in datagrid and 2 columns says the text i've
designated as the nulltext for those columns, but when i look at the data in
the db, those values are listed there.
is there some issue/bug that can be causing this?
thanks Tag: How can I limit the number of the applicatin' login trying ? Tag: 86047
Re: Using a string array as a datasource in a listbox
"claire clinton" claire.clinton@cae.com wrote:
> How do I add a string array as a llstbox datasource in the=20
> designer? I have a static class that defines an array and=20
> don't want to rebuild it in the designer. But I have to=20
> manually add the setting of the listbox datasource in code=20
> since the designer seems to only allow adding datasets as=20
> a datasource. This would be ok except when I go back to=20
> the designer, it converts the datasource assignment of the=20
> class array to an equivalent hard coded new string array=20
> and then adds an Item.AddRange assignment for the same=20
> string which then aborts when I run with the error=20
> message "Can't modify the Items collection when the=20
> DataSource property is set". I fix this by deleting the=20
> designer added code and putting my Datasource assignment=20
> back in. This is extremely annoying and will be=20
> unnacceptable for my final product. How can I prevent this=20
> from occuring.
I am having a similar problem.
Can anyone suggest how to solve it?
Thanks,
Alex.
--=20
Please replace myrealbox with alexoren to reply by email. Tag: How can I limit the number of the applicatin' login trying ? Tag: 86045
How can I turn off the ControlBox but still have Close in the upper right of a form?
I know I've done this in the past but can't remember how I did it.
How can I turn off the ControlBox but still have the Close X in the upper
right of a Form?
It's some combo of FixedDialog and ControlBox = false
thanks
mike Tag: How can I limit the number of the applicatin' login trying ? Tag: 86044
Problem binding a listbox to an array
Hello people,
I am having problems binding a listbox to an array.
Using Visual Studio 2003 with framework 1.1
That's the array:
internal class Data
{
private Data() {} // static class
public static readonly string[] states =3D { "Alabama", =
"Alaska", "Arizona", /* ...*/ "Wisconsin", "Wyoming"};
}
I also have a listbox on a form. The auto-generated code is:
// listStates
this.listStates.Name =3D "listStates";
this.listStates.TabIndex =3D 0;
this.listStates.Location =3D new System.Drawing.Point(8, 16);
this.listStates.Size =3D new System.Drawing.Size(100, 82);
this.listStates.SelectionMode =3D =
System.Windows.Forms.SelectionMode.MultiSimple;
Question number 1:
In the designer, the DataSource property of the listStates ListBox is =
not editable.
I would like to bind it to the array at design time but I cannot.
I that supposed to be like that or am I missing something?
Question number 2:
When I added the following statement
listStates.DataSource =3D Data.states;
it appeared to work but I started having weird behaviour regarding the =
selection.
In particular, after selecting several items and unselecting all of =
them, the first item would become selected.
What am I doing wrong?
Thank you,
Alex.
--=20
Please replace myrealbox with alexoren to reply by email. Tag: How can I limit the number of the applicatin' login trying ? Tag: 86043
Change mouse cursor when points to specific cell
I am creating a linklabel look-a-link in a datagrid with the following code
by overriding the paint sub:
If column = 0 Or column = 3 Or column = 4 Then
Dim UnderlineFont As New
Font(Me.DataGridTableStyle.DataGrid.Font, FontStyle.Underline)
Dim rect As Rectangle = bounds
Dim value As Object = GetColumnValueAtRow(source, rowNum)
g.FillRectangle(backBrush, rect)
g.DrawString(value.ToString, UnderlineFont, Brushes.Blue,
RectangleF.FromLTRB(rect.X, rect.Y, rect.Right, rect.Bottom))
Else
MyBase.Paint(g, bounds, source, rowNum, backBrush,
foreBrush, alignToRight)
End If
I only create the linklabel look-alike in specific rows and columns. Now I
have to have the cursor change to a 'hand' when the mouse moves over a cell.
Note! I am creating the datagrid programmatically so I do not know what rows
will contain a link (so I can not use the example by George Shepard in
sycfusion). Also, there is NOT a mouseup or mousedown event to work with. I
only want the cursor to change to a hand on a specific cell, not a whole row.
I have been trying to do with with the datagrid.hittestinfo but can't seem
the to get it.
Thanks!
--
Suz Tag: How can I limit the number of the applicatin' login trying ? Tag: 86041
Delegate by Book
Does anyone know about a good book that teaches Delegates or other types type
threading? Tag: How can I limit the number of the applicatin' login trying ? Tag: 86038
Switching between MDI child windows...
I have an MDI application that is causing slight problems when I try to
programmatically switch between child forms. When I press CTRL+TAB, the
forms switch without much of a flicker at all. But when I try to fire
an MDI switch from a toolbar button, I get a pretty noticeable flicker.
The way I am changing forms is through the use of the Activate() method
on the child form. For instance,
nextChild.Activate();
I've tried using the ActivateMdiChild method, i.e.,
this.ActivateMdiChild(nextChild);
but it doesn't seem to do anything.
Is there something that I'm missing? I really just want to know how the
framework Form class handles a CTRL+TAB key press so I can do the same
thing.
Thanks,
Rich Tag: How can I limit the number of the applicatin' login trying ? Tag: 86037
Smarthclient and crystal rpt viewer
Morning all,
How is this viewer suppose to be deployed in a Smartclient app.
I keeping having my app looking for Keycodev2.dll.
I have added this to my project and copied the dll to the folder on the
webserver where my exe is.
what do I have to do to get this to work.
--
Deasun
Home Site: www.tirnaog.com
Check out: The Code Vault in my forums section. Tag: How can I limit the number of the applicatin' login trying ? Tag: 86036
OnSetComplete, OnSet methods do not fire
I have a datagrid bound to a strongly typed collection implementing
iBindingList.
When an item is added to the datagrid, OnInsertComplete fires just fine
as I would expect it to.
However, the OnSet and OnSetComplete methods don't seem to be firing at
all.
What I really want to do is:
When a row is added to the list (NOT the first row), default one of the
columns from the row above it. So when row2 gets added, it should
automatically have the value from row1's column X.
Any thoughts/suggestions? Tag: How can I limit the number of the applicatin' login trying ? Tag: 86035
Capturing web page into a bitmap via WM_PRINT
Hi,
I'm copying the image of a web page into a bitmap by loading the page first
into the web browser control (AxSHDocVw.AxWebBrowser) and then sending the
WM_PRINT message to the control. Everything works fine except for pages that
have Flash animations on them. In those cases the bitmap comes out as blank
white. My code is similar to the code in this blog:
http://kentb.blogspot.com/2005/03/nice-form.html .
I don't think there's anything fundamentally wrong with the code as it works
fine for web pages that have no Flash animations.
I wonder if anyone has encountered similar problems? I'd be also happy if I
could somehow disable the Flash animations via MSHTML if that fixed the
problem.
Regards,
Sami Tag: How can I limit the number of the applicatin' login trying ? Tag: 86033
Problems with custom events
Browsing through some online tutorials, I've been tryingto add a custom event
to an app I'm developing but I'm having a little problem.
Simplifying the code down to the following (a form with a button that fires
the event):
namespace CustomEvent
{
public delegate void MyEventHandler(object sender, MyEventArgs e);
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
public event MyEventHandler MyEvent;
protected virtual void OnMyEvent(MyEventArgs e)
{
MyEvent(this, e);
}
<< snip template form code >>
private void button1_Click(object sender, System.EventArgs e)
{
OnMyEvent(new MyEventArgs("Fred"));
}
}
public class MyEventArgs: EventArgs
{
private string name;
public MyEventArgs(string name)
{
this.name = name;
}
public string Name
{
get {return name;}
}
}
}
The problem I'm having is that the MyEvent(this, e); call fails in
OnMyEvent(...) with the following error:
"An unhandled exception of type 'System.NullReferenceException' occurred in
CustomEvent.exe
Additional information: Object reference not set to an instance of an object."
Can anyone explain what I'm doing wrong?
Cheers in advance
Ant Tag: How can I limit the number of the applicatin' login trying ? Tag: 86032
Capturing change to TextBox
I want to simply capture changes to a TextBox and perform some processing
when the user has edited the text.
The TextChanged event fires even while the user is editing the text, but I
only want to perform my validation when the user finished editing the text
and moves off the field (tab, enter, mouse-click somewhere else, etc).
The Validated event fires when the user moves off the field but fires even
if the user does not change the text!
I know I could save the "before value" of the text in a local variable in
the Enter trigger and compare this to the current value in the Leave or
Validate trigger but this is messy! There must be a simpler way surely.
Someone please help! Tag: How can I limit the number of the applicatin' login trying ? Tag: 86026
LIKE A TRANSACTION
Hi,
I've developped a windows application: I've added some code in order to
lauch a merge replication in SQL. My question is: when this code is
executing, is it possible to lock the application?? namely nobody can do
anything until the code is ended!
Thanks for your help :) Tag: How can I limit the number of the applicatin' login trying ? Tag: 86022
Compiler error for MessageBox::Show
I am getting a very strange compiler error for the following code:
catch (OpenGLPanelException *openGLError)
{
//std::string * errorMessage = new
std::string(openGLError->errorString);
System::Windows::Forms::MessageBox::Show( "junk" ); //, "OpenGL Error",
MessageBoxButtons::OK,
//MessageBoxIcon::Exclamation );
exit(1);
}
The error message is:
Compiling...
Form1.cpp
d:\MSDev\Shared Projects\OpenGLPanel\Test1\Form1.h(75) : error C2039:
'MessageBoxA' : is not a member of 'System::Windows::Forms'
d:\MSDev\Shared Projects\OpenGLPanel\Test1\Form1.h(75) : error C2660:
'System::Windows::Forms::Control::Show' : function does not take 1 arguments
d:\MSDev\Shared Projects\OpenGLPanel\Test1\Form1.h(246) : warning C4244:
'argument' : conversion from 'double' to 'GLfloat', possible loss of data
Build log was saved at "file://d:\MSDev\Shared
Projects\OpenGLPanel\Test1\Debug\BuildLog.htm"
Test1 - 2 error(s), 1 warning(s)
It appears to want to replace the text as if a #define is taking precedence
somewhere. The include information is:
#include <windows.h>
#include <GL\gl.h>
#include <iostream>
namespace Test1
{
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace OhioState;
If I do not fully scope it, the tooltip seems to indicate MessageBox is the
MFC instance.
Any help or suggestions?
Roger Tag: How can I limit the number of the applicatin' login trying ? Tag: 86012
Label and Button text not drawing
(Type your message here)
I have a small assembly that displays dialogs for logging in and message boxes if an error occurs.
The button text and label text in the dialogs isn't drawing when the form is opened
by either Dialog.ShowDialog() or MessageBox.Show(). In the case of a dialog, some of
the labels appear and some do not. The button text doesn't appear for either
dialogs or message boxes.
The text draws correctly in the Designer.
I was able to 'repair' the dialogs by deleting the controls and re-adding them
to the form in the Designer. I don't have that option in a MessageBox.
Anyone seen this behavior before?
--------------------------------
From: Don Dusich
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>N41D2NHa90W/Q0PaoCYfpw==</Id> Tag: How can I limit the number of the applicatin' login trying ? Tag: 86009
Sources for threads
Hi all,
Does anybody know where I can find some good examples of using threads in
c#.net windows applications?
Thanks
Gav Tag: How can I limit the number of the applicatin' login trying ? Tag: 86006
Can I run any app inside a "special" control
I'm looking for a control which will allow me to run any app inside a
Window/Panel/Tab
Specifically I want to be able to save xml files created from XMLSpy to a
database in a very specific format - I'd like to run XMLSpy in a window
inside this app, then save/retrieve files to/from a sql server db. Not
quite seamless integration, but better than nothing.
Thanks Tag: How can I limit the number of the applicatin' login trying ? Tag: 86004
Menu Shortcut Key Not working
I have an MDI winform application. One of the menu items is using CTRL+U as
the shortcut and it will not invoke the menu item. Here is a list of things
I have tried to resolve the problem.
1) Tested CTRL+U in Word to make sure that the keys are working properly.
Success
2) Re-Assigned the menu item a different shortcut. Success
3) Re-Assigned a different menu item the CTRL+U shortcut. Failure
4) Created a new project with one form, and a menu item with the CTRL+U
shortcut. Success.
5) I can hot key to the menu item (the underllined letters for the menu
items). Success
6) I can click on the menu item. Success
Controls on the MDI Parent form
1) CDDB control
2) MCI control
3) menu items
Controls on the MDI child form the menu item is affecting
1) Labels
2) text boxes
3) tab control with 2 pages
4) 2 grid controls (1 per page)
5) toolbar
Any thoughts/suggestions on why CTRL+U won't work?
Thanks,
Greg Tag: How can I limit the number of the applicatin' login trying ? Tag: 86002
Making it possible for user to move controls on form, how?
How can I make it possible for a user to move a control on a form by
selecting it and then using the arrow keys to move it to a new location? For
instance suppose I have a form that represents the output of a cheque and I
want the user to be able to move the date and amount fields so that they cn
be printed out at the correct location on his preprinted cheque stock?
Any help or a pointer to some sample code would be greatly appreciated.
Thanks,
RD Tag: How can I limit the number of the applicatin' login trying ? Tag: 86001
Refreshing Form on Process
Hello,
I have a windows application written in VB .NET which pulls a lot of data
from different databases into one source. This often takes a long time and
therefore I track the progress using a progress bar and a status bar.
When the program is running and I use another application the form turns
white and doesn't refresh itself until the process is complete. Could anyone
advice me/provide a VB example of the best way to keep a windows form
refreshed when running, but still restrict the user from setting off another
process?
Many thanks for your advice. Tag: How can I limit the number of the applicatin' login trying ? Tag: 85995
Reusing GUI elements
Hello people,
I'm new at .NET development so forgive me if I ask about the obvious.
There are several forms in my application that have similar groups of =
controls.
I would like to extract the UI and functionality into a single entity so =
I can reuse it in the application.
What is the easiest way to implement it?
(I don't really want to create a standalone control since the "grouping" =
only makes sense inside this particular application).
Thank you,
Alex.
--=20
Please replace myrealbox with alexoren to reply by email. Tag: How can I limit the number of the applicatin' login trying ? Tag: 85992
Nasty bug with OwnerDrawn context menus on a ComboBox
Have a look at the code below. It's a really simple example where I
have added two controls to a form, a textbox and a combo box. Both add
owner drawn context menus to the controls, but the combobox will NOT
draw custom drawn context menu item. I have tried EVERYTHING (deriving
from MenuItem and even tried calling TrackPopupMenuEx directly), but
it just won't work!
I am currently reflecting over the combobox source code (oh joy!), but
if anyone can help me, I will BE SOOOOO VERY GRATEFUL!!!!
thanks
andrew
using System;
using System.Drawing;
using System.Diagnostics;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace ComboContextBug
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private ComboTest comboBox1;
private TextBoxTest textBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.comboBox1 = new ComboContextBug.ComboTest();
this.textBox1 = new ComboContextBug.TextBoxTest();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// comboBox1
//
this.comboBox1.Location = new System.Drawing.Point(180, 32);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(121, 21);
this.comboBox1.TabIndex = 0;
this.comboBox1.Text = "comboBox1";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(180, 98);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(121, 20);
this.textBox1.TabIndex = 1;
this.textBox1.Text = "textBox1";
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 20);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(168, 52);
this.label1.TabIndex = 2;
this.label1.Text = "Right click this combo and you will see that
the OwnerDrawn item does NOT appear!" +
"";
//
// label2
//
this.label2.Location = new System.Drawing.Point(8, 86);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(168, 52);
this.label2.TabIndex = 3;
this.label2.Text = "Right click this textbox and you will see that
the OwnerDrawn item DOES appear!";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(336, 157);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.comboBox1);
this.Name = "Form1";
this.Text = "Combo Context Menu Bug";
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
}
public class ComboTest: ComboBox
{
public ComboTest()
{
base.ContextMenu = new ContextMenu();
MenuItem mnuOwnerDraw = new MenuItem();
mnuOwnerDraw.Text = "This text WILL NOT appear on a ComboBox!";
mnuOwnerDraw.OwnerDraw = true;
mnuOwnerDraw.DrawItem +=new
DrawItemEventHandler(mnuOwnerDraw_DrawItem);
mnuOwnerDraw.MeasureItem +=new
MeasureItemEventHandler(mnuOwnerDraw_MeasureItem);
base.ContextMenu.MenuItems.Add(0, mnuOwnerDraw);
MenuItem mnuNormalDraw = new MenuItem();
mnuNormalDraw.Text = "This text WILL appear!";
mnuNormalDraw.OwnerDraw = false;
base.ContextMenu.MenuItems.Add(0, mnuNormalDraw);
}
private void mnuOwnerDraw_DrawItem(object sender, DrawItemEventArgs
e)
{
MenuItem menu = sender as MenuItem;
e.Graphics.DrawString( menu.Text, this.Font,
SystemBrushes.ControlText, e.Bounds.X + 15, e.Bounds.Y );
}
private void mnuOwnerDraw_MeasureItem(object sender,
MeasureItemEventArgs e)
{
MenuItem menu = sender as MenuItem;
string text = menu.Text;
e.ItemWidth = (int)(e.Graphics.MeasureString(text,
this.Font).Width) + 3;
e.ItemHeight = (int)(e.Graphics.MeasureString(text,
this.Font).Height) + 2;
}
}
public class TextBoxTest: TextBox
{
public TextBoxTest()
{
base.ContextMenu = new ContextMenu();
MenuItem mnuOwnerDraw = new MenuItem();
mnuOwnerDraw.Text = "This text WILL appear on a Textbox!";
mnuOwnerDraw.OwnerDraw = true;
mnuOwnerDraw.DrawItem +=new
DrawItemEventHandler(mnuOwnerDraw_DrawItem);
mnuOwnerDraw.MeasureItem +=new
MeasureItemEventHandler(mnuOwnerDraw_MeasureItem);
base.ContextMenu.MenuItems.Add(0, mnuOwnerDraw);
MenuItem mnuNormalDraw = new MenuItem();
mnuNormalDraw.Text = "This text WILL appear!";
mnuNormalDraw.OwnerDraw = false;
base.ContextMenu.MenuItems.Add(0, mnuNormalDraw);
}
private void mnuOwnerDraw_DrawItem(object sender, DrawItemEventArgs
e)
{
MenuItem menu = sender as MenuItem;
e.Graphics.DrawString( menu.Text, this.Font,
SystemBrushes.ControlText, e.Bounds.X + 15, e.Bounds.Y );
}
private void mnuOwnerDraw_MeasureItem(object sender,
MeasureItemEventArgs e)
{
MenuItem menu = sender as MenuItem;
string text = menu.Text;
e.ItemWidth = (int)(e.Graphics.MeasureString(text,
this.Font).Width) + 3;
e.ItemHeight = (int)(e.Graphics.MeasureString(text,
this.Font).Height) + 2;
}
}
} Tag: How can I limit the number of the applicatin' login trying ? Tag: 85991
I give a login form for my application,
and I give 3 times to the app's user,
if he input his name and pwd out 3 times,
the login form will closed .
how can I do it ?
Re: How can I limit the number of the applicatin' login trying ? by Frank
Frank
Sun Apr 03 12:29:31 CDT 2005
Hi,
> I give a login form for my application,
> and I give 3 times to the app's user,
> if he input his name and pwd out 3 times,
> the login form will closed .
> how can I do it ?
Just declare a variable in the form and with each try you count up and check
if the max number is reached ...???
Re: How can I limit the number of the applicatin' login trying ? by χθΑι
÷èÁé
Sun Apr 03 13:10:39 CDT 2005
Thanks.
I had soloved this problem with your help !
"Frank Eller" <fe[NOSPAM]@frankeller.de> дÈëÏûÏ¢ÐÂÎÅ:%23h3YrKHOFHA.1732@TK2MSFTNGP14.phx.gbl...
> Hi,
>
>> I give a login form for my application,
>> and I give 3 times to the app's user,
>> if he input his name and pwd out 3 times,
>> the login form will closed .
>> how can I do it ?
>
> Just declare a variable in the form and with each try you count up and
> check if the max number is reached ...???
>
> Regards,
>
> Frank Eller
> www.frankeller.de
>
>