Users Picture
Hi,
I need to identify the pictures associated to the Users on a PC, like
the ones you find on the start session screen where you have to pick
the user for the session...
I'd love to do that in C# and I already tryed these lines but
unsuccessfully:
public Image GetUserImage(){
String ImagePath="";
String TempPath = Environment.GetEnvironmentVariable("TEMP");
String UserName =
Environment.GetEnvironmentVariable("USERNAME");
String AppPath =
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
if (Environment.OSVersion.Version.Major < 6){
ImagePath = String.Format("{0}\\{1}.bmp", TempPath,
UserName);
}else{
ImagePath = String.Format("{0}\\{1}.bmp", TempPath,
UserName);
}
string userName =
System.Environment.GetEnvironmentVariable("USERNAME");
string userLocal =
System.Environment.GetEnvironmentVariable("USERPROFILE");
string userPicture = userLocal + "\\Local Settings\\Temp\\" +
userName + ".bmp";
if (System.IO.File.Exists(userPicture))
{//ImagePath
return Image.FromFile(String.Format("{0}\\{1}.bmp",
TempPath, UserName));
}
else{
return null;
}
}
Regards,
Stef Tag: Textbox overtype Tag: 116210
datagrid to excel
Hi,
I;ve a requirement wherein the need to export the data from grid to excel file
using .net 1.1..
While I do the export to file, sfew columns in teh excel file should be
locked,
in the sense..use shouldn't be able to edit the values in those columns...
is this possible thru C#? any samples Tag: Textbox overtype Tag: 116209
DragDrop from one dataGridView to another (C#)
Hello,
I have a form with two similar DataGridViews. They have identical fields. I
want to drag multiple selected rows from one to the other. I have spent the
evening looking for sample code for this with no success in finding a
complete sample. I have tried for hours to work together incomplete samples
to make one work for me without success. Could someone direct me to a
working sample or provide one for me?
It is not important where in the second dgv that the new rows are placed. It
will start empty and be used like a shopping cart.
Thank you very much,
Douglas Tag: Textbox overtype Tag: 116207
DataGridView column autoresize hangs application
I tried to use DisplayedCellsExceptHeader column resize mode in
DataGridView.
Clicking in column separator line causes application to stop responding.
Grid reads all rows for unknown reason.
How to implement column autorisize so that only displayed columns are used
for autoresize ?
Andrus.
Steps to reproduce:
1. Run code below
2. Double click in grid header in separation line between columns 1 ja 2
Observed:
CPU usage goes to 100% for a long time.
using System;
using System.Windows.Forms;
using System.Collections.Generic;
class test {
[STAThreadAttribute()]
public static void Main() {
Application.Run(new VirtualModeForm());
}
}
class VirtualModeForm : Form {
private List<DataObject> m_Data = new List<DataObject>();
private List<bool> m_Visited = new List<bool>();
DataGridView m_Grid = new DataGridView();
public VirtualModeForm() {
Controls.Add(m_Grid);
m_Grid.CellValueNeeded += OnCellValueNeeded;
InitData();
InitGrid();
}
private void InitData() {
for (int i = 0; i < 1000001 + 1; i++) {
m_Visited.Add(false);
DataObject obj = new DataObject();
obj.Id = i;
obj.Val = 2 * i;
m_Data.Add(obj);
} }
private void InitGrid() {
m_Grid.Dock = DockStyle.Fill;
m_Grid.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.DisplayedCellsExceptHeader);
m_Grid.VirtualMode = true;
m_Grid.ReadOnly = true;
m_Grid.ColumnCount = 3;
m_Grid.Rows.Add();
m_Grid.Rows.AddCopies(0, 1000000);
}
private void OnCellValueNeeded(object sender, DataGridViewCellValueEventArgs
e) {
m_Visited[e.RowIndex] = true;
if (e.ColumnIndex == 0) {
e.Value = m_Data[e.RowIndex].Id;
} else if (e.ColumnIndex == 1) {
e.Value = m_Data[e.RowIndex].Val;
} else if (e.ColumnIndex == 2) {
Random rand = new Random();
e.Value = rand.Next();
}
}
}
public class DataObject {
private int m_Id;
private int m_Val;
public int Val {
get { return m_Val; }
set { m_Val = value; }
}
public int Id {
get { return m_Id; }
set { m_Id = value; }
}
} Tag: Textbox overtype Tag: 116197
WPF or Windows Forms
Hi
If I have a choice of WPF or Windows Form versions of a control which one
should I purchase?
Thanks
Regards Tag: Textbox overtype Tag: 116182
NGen questions
Hi
1. Has ngen been improved in vs2008 from previous versions?
2. How can I included ngen with setup file created by vs 2008 so the setup
runs the ngen at target machine after installation?
Thanks
Regards Tag: Textbox overtype Tag: 116179
Opening a form hidden
Hi
I have searched for answer to this question on the net but surprisingly no
clear answer has come up. How can I open a form hidden in vb.net?
Thanks
Regards Tag: Textbox overtype Tag: 116165
Reducing app start-up time
Hi
I am looking to reduce app loading time. My question is, if I use the splash
screen feature from App Properties->Application->Splash Screen does it add
to the app loading time and am I better of running the splash screen using
the background worker?
Thanks
Regards Tag: Textbox overtype Tag: 116161
Initial opening speed
Hi
My vb.net seems to be slow on initial loading. My clients are not impressed
as they had used the ms access version of the app previously and think that
the old app is faster in loading. I understand .net apps need to compile
themselves before execution. Is there any way I can speed up this process or
in general do anything else to speed up initial loading of the vb.net app?
Thanks
Regards Tag: Textbox overtype Tag: 116157
Formatting PrintDocument
This is a multi-part message in MIME format.
------=_NextPart_000_0006_01C87491.D2C9CE60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Can someone post a link to more indepth samples of formatting a =
PrintDocument. I've found some info for the ReportViewer, but not for =
the PrintDocument.
Specifically, I'm looking for a code example of how to underline text in =
the middle of a document; how to draw a horizontal line and how to draw =
a box around text.
My guess is that I'm going about this all wrong. Below is a snippet of =
how I'm setting up the page.
Thanks,
Ross
dim line as string
line =3D line & Microsoft.VisualBasic.Space(Col1) & =
Microsoft.VisualBasic.UCase(RTrim(Me.CityStateZipTextBox.Text))
line =3D line & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf
Do While detCntr <=3D detCNT
line =3D line & Me.ShippingLogDetailDataGridView.Rows(detCntr - =
1).Cells(4).Value
line =3D line & Microsoft.VisualBasic.Space(13)
Select Case RTrim(Me.ShippingLogDetailDataGridView.Rows(detCntr - =
1).Cells(1).Value.ToString)
Case "F"
line =3D line & "STAINLESS FITTINGS & FLANGES" & =
Microsoft.VisualBasic.Space(36)
Case "P", "T"
line =3D line & "STAINLESS PIPE" & =
Microsoft.VisualBasic.Space(50)
Case "V"
line =3D line & "STAINLESS VALVES" & =
Microsoft.VisualBasic.Space(48)
End Select
detCntr =3D detCntr + 1
Loop
line =3D line & Microsoft.VisualBasic.Space(Col1) & =
Microsoft.VisualBasic.Space(15) & "Customer PO #: " & =
Microsoft.VisualBasic.UCase(RTrim(Me.CustPOTextBox.Text)) & vbCrLf
line =3D line & Microsoft.VisualBasic.Space(Col1) & =
Microsoft.VisualBasic.Space(15) & "Tag #: " & =
Microsoft.VisualBasic.UCase(RTrim(Me.CustomersCustomersPONOTextBox.Text))=
& vbCrLf & vbCrLf
yPos =3D topMargin + count * printFont.GetHeight(ev.Graphics)
ev.Graphics.DrawString(line, printFont, Brushes.Black, leftMargin, yPos, =
New StringFormat())
------=_NextPart_000_0006_01C87491.D2C9CE60
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.6000.16608" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Can someone post a link to more indepth =
samples of=20
formatting a PrintDocument. I've found some info for the =
ReportViewer, but=20
not for the PrintDocument.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Specifically, I'm looking for a code =
example of how=20
to underline text in the middle of a document; how to draw a horizontal =
line and=20
how to draw a box around text.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>My guess is that I'm going about this =
all=20
wrong. Below is a snippet of how I'm setting up the =
page.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Ross</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>dim line as =
string</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>line =3D line &=20
Microsoft.VisualBasic.Space(Col1) &=20
Microsoft.VisualBasic.UCase(RTrim(Me.CityStateZipTextBox.Text))</FONT></D=
IV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>line =3D line & =
vbCrLf & vbCrLf=20
& vbCrLf & vbCrLf & vbCrLf & vbCrLf</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>Do While detCntr =
<=3D=20
detCNT</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2> line =3D line =
&=20
Me.ShippingLogDetailDataGridView.Rows(detCntr - =
1).Cells(4).Value</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2> line =3D line =
&=20
Microsoft.VisualBasic.Space(13)</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2> Select Case=20
RTrim(Me.ShippingLogDetailDataGridView.Rows(detCntr -=20
1).Cells(1).Value.ToString)</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2> =
Case=20
"F"</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2> =
=20
line =3D line & "STAINLESS FITTINGS & FLANGES" &=20
Microsoft.VisualBasic.Space(36)</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2> =
Case "P",=20
"T"</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2> =
=20
line =3D line & "STAINLESS PIPE" &=20
Microsoft.VisualBasic.Space(50)</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2> =
Case=20
"V"</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2> =
=20
line =3D line & "STAINLESS VALVES" &=20
Microsoft.VisualBasic.Space(48)</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2> =
End=20
Select</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff =
size=3D2> detCntr=20
=3D detCntr + 1</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>Loop</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>line =3D line &=20
Microsoft.VisualBasic.Space(Col1) & Microsoft.VisualBasic.Space(15) =
&=20
"Customer PO #: " &=20
Microsoft.VisualBasic.UCase(RTrim(Me.CustPOTextBox.Text)) &=20
vbCrLf</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>line =3D line &=20
Microsoft.VisualBasic.Space(Col1) & Microsoft.VisualBasic.Space(15) =
&=20
"Tag #: " &=20
Microsoft.VisualBasic.UCase(RTrim(Me.CustomersCustomersPONOTextBox.Text))=
&=20
vbCrLf & vbCrLf</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>yPos =3D topMargin + =
count *=20
printFont.GetHeight(ev.Graphics)</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff =
size=3D2>ev.Graphics.DrawString(line,=20
printFont, Brushes.Black, leftMargin, yPos, New=20
StringFormat())</FONT></DIV></BODY></HTML>
------=_NextPart_000_0006_01C87491.D2C9CE60-- Tag: Textbox overtype Tag: 116150
UserControls?
I am a web developer by trade, but have done a little with winforms.
How can I add a winforms user control to an application without having
to create a separate project for each control? From what I have been
reading, you need to create a project for the user control, build it,
and then add it to the tool box. Once it is in the tool box you can
drag it onto the form or other control. I want the user controls to be
part of the base project and add them to the forms without having to
build them each time I make a change. Can I modify the designer.vb
file to do what I need?
Daniel Tag: Textbox overtype Tag: 116147
DataGridView & TabPages
Hi,
This is my first message to this group. I've already search the web,
google, this group, found some clues to my problem but found no
solution or workaround. So please let me explain my problem:
I'm developing an application, which has custom UserControls
containing DataGridView controls being put inside TabPages of a
TabControl at runtime (I hope this made sense). Well, those are being
added dinamically at runtime simply because VisualStudio keeps
deleting my controls due to a bug in the designer. This is a issue,
but the problem I'm facing now is other. Please check those images:
http://www.comp.ufscar.br/~cesarsouza/archive/CSharp/bug/
The first image is of my application, windowed, in normal mode, with
the DataGridView loaded. Then, the window is maximized in the second
image, and you can notice the grid didn't resize itself. Now, the
third image reveals that the 'gap' produced is indeed not being redraw
at all.
The DataGridView is anchored on the four directions inside the
UserControl, which is set to DockStyles.Fill inside the tab page. An
interesting thing is, everything happens normally _before_ the data
has been loaded and the data is bound. The same occurs backwards, i.e.
If I load the data when the window is maximized and then resize it,
the DataGridView gets bigger than its container control and becomes
corrupted.
I'm pretty sure this is a bug in the framework (I'm using 2.0) dealing
with DataGridViews being put inside TabPages. If someone has already
face this problem, please let me know.
If nothing else works, I would like to know how I could force a
complete redraw, or a re-bind after I completed a resize move. Just
calling dataGridView.Refresh(), Invalidate, Redraw, or whatever seems
to have no effect.
Thanks in advance,
Cesar Souza Tag: Textbox overtype Tag: 116146
DataGrid Template.
This is a multi-part message in MIME format.
------=_NextPart_000_018C_01C874C6.4A8EAC70
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Web form's datagrid has itemtemplate to define no of columns, which =
control need to be show on particular column (Like textbox, radio =
button...).
Is there any way to define Template in WindowsForms?. I want one column =
should show radio button and another one need to show NumericUpDown.
--
Rajesh A
+91-9886124372
S7 Software Solutions
"NOTHING IS IMPOSSIBLE. IMPOSSIBLE IT SELF CONTAIN POSSIBLE."
------=_NextPart_000_018C_01C874C6.4A8EAC70
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=3Dtext/html;charset=3Diso-8859-1>
<META content=3D"MSHTML 6.00.6000.16609" name=3DGENERATOR></HEAD>
<BODY id=3DMailContainerBody=20
style=3D"PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px"=20
bgColor=3D#ffffff leftMargin=3D0 topMargin=3D0 CanvasTabStop=3D"true"=20
name=3D"Compose message area">
<DIV><FONT face=3DArial color=3D#003366 size=3D2>Web form's datagrid has =
itemtemplate=20
to define no of columns, which control need to be show on particular =
column=20
(Like textbox, radio button...).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT color=3D#003366>Is there any way =
to define=20
Template in <STRONG>WindowsForms</STRONG>?. I want one column should =
show radio=20
button and another one need to show NumericUpDown.</FONT></FONT></DIV>
<DIV><STRONG><FONT face=3DArial color=3D#003366 =
size=3D2></FONT></STRONG><SPAN=20
style=3D"FONT-SIZE: 12px; COLOR: #1f497d"><BR><STRONG>--<BR>Rajesh=20
A<BR>+91-9886124372<BR></STRONG><A=20
title=3D"http://www.s7software.com/ CTRL + Click to follow link"=20
href=3D"http://www.s7software.com/"><STRONG>S7 Software=20
Solutions</STRONG></A><BR></SPAN><STRONG><SPAN=20
style=3D"FONT-SIZE: 12px; COLOR: red">"NOTHING IS IMPOSSIBLE.</SPAN> =
<SPAN=20
style=3D"FONT-SIZE: 12px; COLOR: green">IMPOSSIBLE IT SELF CONTAIN=20
POSSIBLE."</SPAN><BR></DIV></STRONG><BR></BODY></HTML>
------=_NextPart_000_018C_01C874C6.4A8EAC70-- Tag: Textbox overtype Tag: 116145
Transparent frame?
I need to use a control that is just a border, like transparent
System.Windows.Forms.Panel (I need to display form's background image). Can
you advice on what I can use or how to make Panel transparent?
Thank you. Tag: Textbox overtype Tag: 116140
Table Adapter parameters
I was successfully calling a TableAdapter.Fill command in code which was tied
to an SQL stored procedure. I changed the stored procedure to include two
additional parameters and it stopped working in code. The stored procedure
works when previewing it in the dataset designer. But the line of code comes
up with an error stating 'Expression Expected' and the comma after the first
parameter is underlined. Can't find the problem. I only added three
additional parameters in the stored procedure which I include on the line of
code but no dice. Any ideas? Here is the line of code:
Me.SpWPJOs_TableAdapter.Fill(Me.DsWPJOs.spWPJOs, 'Pending', blWPsCompleted,
'1/1/2007', '12/31/2007') Tag: Textbox overtype Tag: 116139
Save user preferences?
I know this has been discussed before, but I really need a good
example of how this works. I am developing an application that houses
some user preferences and also will allow the user to save the entire
project to a file. Instead of creating XML files that will be saved to
a directory, what is the best way to combine all that information into
one binary file? I have read about IsolatedStorage and Serialization,
but the examples I have seen are too vague or don't apply to what I am
doing. Any help is appreciated.
Daniel Tag: Textbox overtype Tag: 116137
Dynamic event handlers
Hi,
I am trying to dynamically generate a menu, based on entries on a text or
xml file. The text file contains the "tree" after which the menu will need to
be created. Something like the following:
Level 1
-- Level 2
-- Level 2
Level 1
-- Level 2
---- Level 3
I can read the file and generate each menu item definition, with the
corresponding "nesting", without a problem.
What I'm having difficulties with is deciding on how to handle the events
for each of the menu items. Generating the full menu dynamically would mean
having to create the event handlers dynamically, unless I have a fixed amount
of event handlers, which I'm not sure is the best approach. I might be wrong
here...
1. What's the best way to generate event handlers dynamically? I've read
about runtime IL generation, which makes sense but is a bit complex.
2. Using regular event handlers (hard coded), can I capture which of the
menu items is being clicked and what component is the menu being displayed
on? i.e., if the menu is being displayed after a right click on a button or a
picture box, can I: 1) know if it's the picture box or the button displaying
the menu? and 2) can I know what menu/sub menu is being clicked?
Any ideas will be greatly appreciated.
Thanks,
</edwin> Tag: Textbox overtype Tag: 116136
Windows on top
Is there a way that I can determine if my windows form has focus, is acitve
or is on top?
--
Arne Garvander
Certified Geek
Professional Data Dude Tag: Textbox overtype Tag: 116135
Online timesheet 100$ for unlimited users
Online web based timesheet 100$ for unlimited users
Source code is available in just US$250
by http://www.livetecs.com
TimeLive Web timesheet suite is integrated suite for time record, time
tracking and time billing software. The TimeLive suite of products
deliver a time tracking solution for professional service providers.
Each of our products has been designed to meet the time tracking
needs of specific segments of the service provider market, including
both time tracking and time and billing applications.
TimeLive on-demand timesheet solution helps organizations eliminate the
paperwork and manual processes associated with time collection.
TimeLive is available in two different flavors. Hosted version and
downloadable version. Downloadable version required certain system
requirement to install on local server. Whereas hosted version is already
installed on our fully managed server on state of art datacenter.
Free Lite version is available in both hosted and installable version.
Here are some key features of "TimeLive":
Online TimeSheet
-------------------
- Track your contractor and employee's timesheet using full featured and
easy to use Time Entry tool. You can then use detailed and summarized
view
of all time records using different tools.
- Time Entry Day View for entering full day timesheet in just one server
hit.
- Time Entry Week View for entering full week timesheet in just one server
hit.
- Organization setup like Departments, Locations, Roles
- Different type of Off day monitoring like Sick Days, Vacations etc.
- Client Setup with multiple client contacts and departments.
- Project Setup
- Task setup with multiple assignees for single task.
- Audit Trail
- EMail notification of different timesheet related activities to users.
- Different billing type setup like Hourly / Task based / Call based
- Timesheet approval
- Customizable Timesheet Approval Paths
(None,Administrator,Project,TeamLead, External User (Client))
- Reports with all possible filter selection to get your required output.
- Detail Timesheet Report
- Different timesheet summary reports for based on Client, Project,
Employee, Date
- Timesheet Approval status report
- Reminders to employee for their pending entries.
- Role wise billing rates.
Billing
-------
- Different billing rate pick option like employee own billing rate, role
based billing rate, project specific billling rate.
- Billing rate history
- Billable / non billable hour tracking
- Different billing related reports
Attendance
------------
- Web based Attendance system to record and monitor all employee attendance
using simple / fully featured tool.
- Time In
- Time Out
- Off Day reporting for different purpose like Sick leave, vacation etc
- Working Day setup
- Daily Attendance report
- Summary reports for employee off days to track employee Sick
leave,vacation etc.
- Detail report employee off days.
Expenses Tracking
------------------
- Manage and monitor your project expenses with easy to use integrated
TimeLive Expense management tools.
- Expense entry view for employee to enter their expenses occurred on
project.
- Billable / Unbillable expenses.
- Detail Reports for monitoring expenses
- Different summarize report by Project / Employee / Expenses.
- Customizable Approval of Expenses with different approval options.
-- Team Lead
-- Project Manager
-- Administrator.
-- Client (External User)
- Expenses approval monitoring.
Project Monitoring
---------------------
- Full featured tool to manage your projects and their task with single
integrated tool.
- Nested Task with task hierarchy.
- Tracking of project status
- Assigning of projects to multiple employee
- Tracking of project tasks
- Different dashboard view for Project Manager, Team Lead and Team Member.
- Different report to track and monitor overall project status.
Other Features
----------------
- Exportable reports in Word, PDF and XLS file.
- Downloadable / Hosted version
- Free full featured basic version upto 5 users
- Unlimited disk space for all plans
- International date formats supported.
- Role based security.
- Multiple currency support.
- Fully customizable UI with ability of changing company logo.
Developed in ASP.Net 2, Microsoft ASP.Net Ajax 1.0, SQL Server 2005 Tag: Textbox overtype Tag: 116134
managed Multimedia development
I may be missing something, so I'm making this a general question.
I need to do some multimedia work. Essentially display a movie image (or two
in one windw) plus some text and overlay text. For the overlays to work I'll
need to be able to identify the movie frame being shown (ideally via an
event).
I expect to use Windows Media Video 9 movies as a minimum, though Flash
support would also be nice, and Quicktime support nicer still.
The end devie will be semi-embedded, and run on XPe at least, though I'd
love to be able to compile onto the .NET CF and run under CE6.0.
I've been working with the Quartz library and a public domain managed code
wrapper for that library.
To the question - there must be a better way than this! Have I completely
missed some .NET class? Yes, I've messed with the Media Player DLL but that
just doesn't have the fine control of the Quartz functions .. but the Quartz
functions are not managed and the process of calling it from a .NET
environment is .. well .. kludgy.
Any help or advice appreciated.
Phil Tag: Textbox overtype Tag: 116133
String Format
Hi All,
1. This is my string
"The description of the problem ERIndia_Bharti / 2/19/2008 8:37:00 PM last
comment only ER_Kista / 2/19/2008 9:45:00 AM last comment only ER_Kista /
2/19/2008 9:45:59 AM last comment only ER_Kista / 2/19/2008 9:47:00 AM"
I want to extract all those dates in this(here count is 4) and wants to
change them in the format say 2008-02-19T09:45:00(FOR 2/19/2008 9:45:00 AM
e.g.) and 2008-02-19T20:37:00Z(FOR 2/19/2008 8:37:00 PM) ,means 24 hours time
and then wants to store them in their postitions
like
"The description of the problem ERIndia_Bharti / 2008-02-19T20:37:00Z last
comment only ER_Kista / 2008-02-19T09:45:00Z last comment only ER_Kista /
2008-02-19T09:45:59 last comment only ER_Kista / 2008-02-19T09:47:00Z"
Where T and Z are just a aplphabet which needs to be concat.
How is this possible?This string has many dates like above in the sentence
but format will remian same(i.e. m/dd/yyyy h:mm:ss) so solution should be
general
Kindly help me
2. the other string wil be in the below format e.g. say
ER_Kista , 2/19/2008 9:47:50 PM
i want it to be printed as 2008-02-19T21:47:50Z
Where T and Z are just a aplphabet which needs to be concat.
Kindly assist me.
Thanks in advande for your work on this issue,
Deepak Tag: Textbox overtype Tag: 116124
VS2005 - disable main form until splash has closed?
Hi everybody,
I am using a form (predefined template) as a splash screen which is being
displayed for a couple of seconds.
Other than with older versions of VS I don't have to fiddle around with
timers and threads to display that form - it seems that the template is
implementing that behaviour behind the scenes for me.
However, I need to keep the main form deactivated until the splash form has
closed. How can I achieve that?
Cheers & TIA,
Olaf Tag: Textbox overtype Tag: 116115
Targeting for fw 2.0
Hi
I have upgraded a vs2003 app into vs2008. How can I tell vs2008 to target
this app for framework 2.0 instead of 3.5? I can't seem to find this option
anywhere.
Thanks
Regards Tag: Textbox overtype Tag: 116107
Capturing hot keys
Hi
How can my main form capture key strokes and pass them to various controls
on the form?
Thanks
Regards Tag: Textbox overtype Tag: 116106
ComboBox binding trouble
In a contacts app I have a company combobox setup like this:
DataSource = ds.Company
DisplayMember = "CompanyName"
ValueMember = "CompanyID"
The SelectedValue property is bound to the Contact table Company field.
companyComboBox.DataBindings.Add(
"SelectedValue", contactBindingSource, "Company");
The problem is the CompanyID is not being set in the Contact table's
Company column.
Company.CompanyID and Contact.Company are both type int
I've check it over several times... I'm not seeing what I'm doing wrong. Tag: Textbox overtype Tag: 116105
DNS-less Connection String Using VS2K5 Datasource Connection Wizard
The quick question is: when creating an SQLdatasource using the wizard in
VS2K5 which requires a new connection, does VS2K5 create a DNS-less
connection or not?
The long question is: I've been told that DNS connections strings
(Datasource=DNSName) are old news and that I should be using a DNS-less
connection string (like Datasource=ServerName); however, none of my
connection strings created with the wizard work anymore now that I've
deleted the DNS ODBC connection with the same name as the SQL Server.
Can anyone shed some light on this for me?
Thanks,
Ross Tag: Textbox overtype Tag: 116104
Copying data between two forms, allocated memory continues to grow
Hi,
I have a simple memory problem with two forms on a MDI project.
The first form (MainForm) open a second one (ImageForm).
Both the forms have an instance to a dataset (DataSet1).
On the ImageForm Form_Load event, I wrote code to copy all the records from
the MainForm.DataSet1.TB_Images dataTable to the ImageForm.DataSet1.TB_Images
dataTable. Note that TB_Images has an Image Field.
I can't understand why opening and closing ImageForm many times, the
allocated memory continues to grow.
This is the code:
' the MainForm opens the ImageForm:
Private Sub OpenImageForm()
Dim f As New ImageForm
If f.ShowDialog(Me.ParentForm) = Windows.Forms.DialogResult.OK Then
'do stuff (or do nothing, the problem doesn't change)
End If
f = Nothing
End Sub
'the Form_Load event of the ImageForm
Private Sub ImageForm_Load(ByVal sender As System.Object, ByVal e As _
System.EventArgs) Handles MyBase.Load
Me.DataSet1.TB_Images.Clear()
For Each rwImages As DataSet1.TB_ImagesRow In _
CType(Me.Owner, MDIParent)._MainForm.DataSet1.TB_Images
Me.DataSet1.TB_Images.ImportRow(rwImages)
Next
End Sub
Any help appreciated! Tag: Textbox overtype Tag: 116101
DataGridView Column Resizing Just Quit On Me??
I have a DataGridView "grid" filling a splitter panel and have set:
grid.AllowUserToResizeColumns = true;
Until just recently the column resize worked perfectly when I drug a
header column divider. Now, it has just stopped allowing me to grab
the column divider?
I can still reorder the columns by dragging them around ... so that
feature is still working.
The sorting by column feature works too.
Any clues? How do you troubleshoot such a problem?
I've been working on various other portions of the program ... but
none of that work should impact the grid's settings. I am really
stumped here. :(
Any suggestions much appreciated.
Thanks.
-- Tom Tag: Textbox overtype Tag: 116100
UserPaint problem with TextBox
Hi,
I am deriving my user control from TextBox .
As I want to do some drawing within the textbox , I am doing the following :-
1) SetStyle(ControlStyles.UserPaint , true );
2) Overriding OnPaint
The drawing stuff works fine in OnPaint .
The problem happens with the font ;
Though I have set the font property to "Arial", 12 pt .
the effect is not there when ==> SetStyle(ControlStyles.UserPaint , true );
I want to have the Arial font as well I need to do the drawing.
I tried with WM_PRINT , and PRF_CLIENT but it did not work .
Please let me know how to acheive the above .
Thanks in advance.
Sujay
--
Sujay Ghosh
Bangalore, INDIA Tag: Textbox overtype Tag: 116099
Error running app in production
Hi
I created a setup file of my app and remotely installed it on a clients
machine. The app bombs at start-up with the error;
Error while initializing application: Retrieving the COM class factory for
component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to
the following error: 8007007e.
The application also gave a stack trace which is given below at the end.
What's more there is no JIT debugger on the target system. What is the
problem and how can I proceed from here specially when I have little or now
way to debug the app on the target system.
Many Thanks
Regards
Stack Trace
========
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an
object.
at EMS.frmClients.RefrshDropDowns(Boolean FirstTime)
at EMS.frmClients.BindFieldstoDataSource()
at EMS.frmClients.frmClients_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.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.Show()
at EMS.frmMain.OpenForm(String x, Int32 id)
at EMS.frmMain.frmMain_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(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.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
IV
Assembly Version: 1.0.2968.12064
Win32 Version: 1.0.2968.12064
CodeBase: file:///C:/Program%20Files/IV/Events%20Manager%202008/IV.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
Infragistics2.Win.v7.3
Assembly Version: 7.3.20073.38
Win32 Version: 7.3.20073.38
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Infragistics2.Win.v7.3.DLL
----------------------------------------
Infragistics2.Shared.v7.3
Assembly Version: 7.3.20073.38
Win32 Version: 7.3.20073.38
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Infragistics2.Shared.v7.3.DLL
----------------------------------------
Infragistics2.Win.UltraWinToolbars.v7.3
Assembly Version: 7.3.20073.38
Win32 Version: 7.3.20073.38
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Infragistics2.Win.UltraWinToolbars.v7.3.DLL
----------------------------------------
Infragistics2.Win.UltraWinExplorerBar.v7.3
Assembly Version: 7.3.20073.38
Win32 Version: 7.3.20073.38
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Infragistics2.Win.UltraWinExplorerBar.v7.3.DLL
----------------------------------------
Infragistics2.Win.UltraWinStatusBar.v7.3
Assembly Version: 7.3.20073.38
Win32 Version: 7.3.20073.38
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Infragistics2.Win.UltraWinStatusBar.v7.3.DLL
----------------------------------------
Infragistics2.Win.Misc.v7.3
Assembly Version: 7.3.20073.38
Win32 Version: 7.3.20073.38
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Infragistics2.Win.Misc.v7.3.DLL
----------------------------------------
System.Design
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
Interop.Outlook
Assembly Version: 9.0.0.0
Win32 Version: 9.0.0.0
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Interop.Outlook.DLL
----------------------------------------
Zip
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Zip.DLL
----------------------------------------
System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
Infragistics2.Win.UltraWinGrid.v7.3
Assembly Version: 7.3.20073.38
Win32 Version: 7.3.20073.38
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Infragistics2.Win.UltraWinGrid.v7.3.DLL
----------------------------------------
Infragistics2.Win.UltraWinTabControl.v7.3
Assembly Version: 7.3.20073.38
Win32 Version: 7.3.20073.38
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Infragistics2.Win.UltraWinTabControl.v7.3.DLL
----------------------------------------
Infragistics2.Win.UltraWinEditors.v7.3
Assembly Version: 7.3.20073.38
Win32 Version: 7.3.20073.38
CodeBase:
file:///C:/Program%20Files/Information%20Vision/Events%20Manager%202008/Infragistics2.Win.UltraWinEditors.v7.3.DLL
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box. Tag: Textbox overtype Tag: 116079
Send Email with attachment
I can't be sure my users will have MS Outlook installed, and therefore, I
don't know which client they're using
How can I generically popup a display, adding the currently open file as an
attachment, using whichever email client they have, so they can fill in the
subject and 'To' address? Tag: Textbox overtype Tag: 116076
Auto-arrange in data designer
Hi
If I remember correctly previous versions of vs had some sort of arrange
icons command but I can't seem to find it vs2008? What am I missing?
Thanks
Regards Tag: Textbox overtype Tag: 116058
Printing Programmatically using ReportViewer Control
I've built a report using the ReportViewer control in a Windows application
(VS2K5). With a timer control, I want to be able to programmatically output
it to a printer. FYI, I really rather not use a document control.
Can anyone point me in the right direction?
Thanks.
Ross Tag: Textbox overtype Tag: 116055
I think I have dain bramage
I am attempting to set the font to bold in the header of a DataGridView.
I am drawing a blank at getting the syntax correct. I want to finish this:
gv.ColumnHeadersDefaultCellStyle.Font =
Any help is greatly appreciated. Tag: Textbox overtype Tag: 116051
get the foreground window in my application
I'm trying to get the window that is currently on top in my
application, even if I'm currently working in another application.
Something like the P/Invoke call GetForegroundWindow(), but I want it
to operate only on my application's forms. I've also tried using
Application.OpenForms[], but I don't know how to tell which one is on
top of the others.
Any ideas?
Thanks in advance,
Cosmin Tag: Textbox overtype Tag: 116048
BackgroundWorker and ListView cross-thread exception
Hi,
I am writing an application which displays a list of computers on a network
and then pings each one and displays the result.
To keep the UI responsive, I am doing the ping operation using a
BackgroundWorker component. The Ping method loops through a list of Computer
business objects, pings the name of the computer and stores the result in a
property of the Computer object called Result.
The Computer object also implements INotifyPropertyChanged interface, which
raises a PropertyChanged event when the Result property is modified.
I have an event handler in my form class which listens for the
Computer.PropertyChanged event, and attempts to update the corresponding
ListViewItem with the result of the ping.
However, as soon as I reference the ListView control, or any of the items, I
get:
Cross-thread operation not valid: Control 'ComputerListView' accessed from a
thread other than the thread it was created on.
How can I ensure the ListView gets updated?
Regards,
James Tag: Textbox overtype Tag: 116032
MCSD Resource
I have found a resource providing answers for examination questions
being helpful in certifying for MCSD....
http://technical-talk.com/mc/mcsd/mcsd.asp Tag: Textbox overtype Tag: 116017
MSIExec invoked on each build
Thanks in advance for any information.
When I build my application, MSIExec is running in the background
while the project is compiling. Is there any way to turn this off? I
don't have any setup projects in the solution.
Thanks,
Morgan Tag: Textbox overtype Tag: 116010
Communicating with a service
Hi
I need a vb.net winform app to be able to query a service (also written in
vb.net) and get info in return. Is it possible? Is there a way to do this?
Thanks
Regards Tag: Textbox overtype Tag: 116009
Toolbars change locations
I am building a Windows Forms application in .NET 2.0 using VS 2005. The
application has a menu strip and a tool strip control at the top of the
form. The bottom of the form contains two status bars. I have found that
when I build my Release version and distribute it that others using the
application start it up and the toolbars and status bars change location.
For example the Toolstrip appears above the menu strip control, even though
in my code the design is explicitly set so that the menu is on the top and
the Toolstrip is below it.
I have tried setting the locations manually in the code.
I have tried removing the controls from the controls collection and
explicitly adding them back to the controls collection in the order that I
wish them to appear.
Still, regardless of what I do the toolstrips move. Is there a way to
"lock" down the toolstrips so they stay where the designer (me) has put
them? It looks extremely unprofessional to open an application and have the
toolstrips appear above the menu.
Thanks,
Matt Tag: Textbox overtype Tag: 116007
Textbox input from a customized location
Hi,
Environment : VS 2005 / .NET 2.0 / Windows XP SP2
Requirement :
class MyTextBox : TextBox
{
// more code
}
When I run the application my text box caret blinks in its usual place ( at
the left ).
I want the cursor to be X pixels from the left of the text box and hence
the user can only enter data from that location.
I tried with SelectionStart += X pixels -- it did not work
Then I pinvoke SetCaretPos(X, Y ) - showed up the caret position properly.
Problem :
Though the caret position shows up properly, when I type text within my text
box, the text is taken from the 0th location .
How can I force the user to enter data from the X th location where the
cursor is placed .
NOTE : I have handled OnPaint to do some graphics drawing inside the
textbox... dont think this has any relevance with this query ; just FYI if
something is linked up to this .
Thanks in advance .
Sujay
--
Sujay Ghosh
Bangalore, INDIA Tag: Textbox overtype Tag: 116006
Checkbox and selectnextcontrol
When selecting a Checkbox using the SelectNextControl() method, i've noticed
that the checkbox does not display the focus rectangle.
By writing a simple application with a button and two checkboxes (where the
checkboes have a tab index value greater than the button's), invoking the
SelectNextControl() method from the button click event handler, silently
moves focus to the first checkbox, but no focus rectangle is displayed.
Pressing TAB once, moves the focus to the second checkbox, which can be seen
as the focus rectangle IS displayed.
Any suggestions on how to get the focus rectangle to display for a checkbox
when using the SelectNextControl() method to move to it initially? Tag: Textbox overtype Tag: 116004
How to show waitcursor between different processes
Hi,
I have tried hard but not able to show waitcursor in betwen different
processes.I launch new application from current application by using
system.diagnostics.proceesstartinfo.Till second application is fully
launched,i want to show waitcursor.I have used Current.Cursor =
Cursors.Waitcursor.But it is not working.
Any ideas/insights would be highly appreciated.
Thanks in advance for repyling(as always)
Thanks and Regards.
Manish Bafna. Tag: Textbox overtype Tag: 116003
"Locked" controls?
Hi everybody,
in a VB.Net (VS 2005) application, there is basically three "states" in
which controls are to signal what can be done with them. Usually, values
loaded into controls may be looked at, but not edited ("Locked"). In
certain cases (simplest: user has the permission to change data), controls
allow changing their contents. While certain operations are being carried
out, controls are completely disabled (i.e. the form itself has its
Enabled-property set to <False>).
Thus I need a way of at least visually distinguishing between <.Enabled =
False> and i.e. <"Locked" = True>. The easiest way would be to have
controls appear exactly as the <.ReadOnly> property does - the controls'
background appears grayed out, but the forecolor remains black. This also
enhances readability and copying text or seeing the tooltip is also
possible.
Too bad this property can only be found in some controls but not even for
some the most usual ones, i.e. TextBox and DataGridView have it, but
ComboBoxes and DatePickers don't.
The <EnabledChanged> event didn't help either, as setting the forecolor of
the resepective control seems to not be considered when the control is
disabled.
Any idea how I could realize something like a <ReadOnly> appearance for
controls that themselves do not publish that property?
Cheers & TIA,
Olaf Tag: Textbox overtype Tag: 116002
Getting benefits of Application Framework while using Sub Main for
I have an application that uses Sub Main as the Startup Object.
However, there are certain features available when enabling the
Application Framework (e.g. specifying splash screen, single instance
application, application-level events, etc.) that I have forfeited by
doing this. I'm not sure why one can't have a Startup Object of Sub
Main when enabling the Application Framework, but I'm sure there's a
good reason. So, here are my questions:
Right now the only thing I'm doing in the Sub Main is 1) creating some
global objects that will then be available to all forms, etc. in the
application, and 2) loading a login form where the user can login. I
then check to see if login was successful, and run the application if
it was. Here's the code:
<STAThread()> Public Sub Main()
CreateGlobalObjects()
' Let user attempt to login
Dim login As LoginForm = New LoginForm()
login.ShowDialog()
If (login.DialogResult = DialogResult.OK) Then
Application.Run(New MainForm())
End If
End Sub
QUESTION 1: Is there a way that I could accomplish the same thing but
do it using a form (LoginForm I'd presume) as the Startup Object?
QUESTION 2: What are the good reasons to use Sub Main rather than a
form as the Startup Object?
QUESTION 3: If I can't do the same thing using a form as the Startup
Object, how could I 1) implement a Splash screen, and 2) limit
application to single instance, bringing up existing instance if user
tries to run again? Tag: Textbox overtype Tag: 115995
Saving Print Output to Database
I need to save print output to the database for future retrieval.
I assumed that the best way to do this was to use a BinaryFormatter to
convert my PrintDocument to a byte array - strore the binary stream - then
deserialize it upon recall.
Unfortunately the PrintDocument is not serializable.
How can I store the completed PrintDocument to the DB? Tag: Textbox overtype Tag: 115990
datagridview binding and object properties
Suppose I have an object that looks like this:
public class thing
private mOne as string
private mTwo as string
private mThree as string
private mFour as string
public property one as string
bla
end property
(and so on, public properties for the others)
end class
then I make a List(of Thing) and add a bunch of instances
then I bind the list to a datagridview
It's not possible for me to make the properties private
My problem is that I only want to display properties One and Two in
the grid view. I want Three and Four around to help out with sorting
and data type conversion, but I don't want to display them in the
grid. Currently, I just remove the columns programmatically. But
what I really want is to decorate the properties with attributes that
affect which properties appear in the grid. Does such an attribute
exist?
brian Tag: Textbox overtype Tag: 115987
Different color text in textbox
Can you have different color text is a standard TextBox?
I know you can in a RichText box but what about the TextBox.
Same with bolding - can you bold one line of text in the text box and then
unbold the next line?
Thanks,
Tom Tag: Textbox overtype Tag: 115985
Tabcontrol focus
I would like to connect a tabpage on a tabcontrol with a function key.
I know how to capture a function key. I can programmatically find my
selected tabpage.
Mytabpage.focus does not seem to do anything.
Do I need to create a tabpage click event?
--
Arne Garvander
Certified Geek
Professional Data Dude Tag: Textbox overtype Tag: 115981
How can I put a textbox in override/overtype mode ?
--
Arne Garvander
Certified Geek
Professional Data Dude